summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-04-20 17:40:12 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-04-20 17:40:12 +0200
commit8f5efbc7aa33b792e02d01e3288f553e6e98ccaa (patch)
tree54a67ebd11fac07d630fa03acad7797b2f781e80 /src/modules/m_httpd.cpp
parentdda1d696c1316b09d65763b4f12bc2b63cfbbe72 (diff)
parent1548078e5dc304814669cd1ea052f92be9d1ac40 (diff)
Merge insp20
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r--src/modules/m_httpd.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index e09ca3fa2..aa83b120c 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -407,6 +407,20 @@ class ModuleHttpServer : public Module
return MOD_RES_ALLOW;
}
+ void OnUnloadModule(Module* mod)
+ {
+ for (insp::intrusive_list<HttpServerSocket>::const_iterator i = sockets.begin(); i != sockets.end(); ++i)
+ {
+ HttpServerSocket* sock = *i;
+ ++i;
+ if (sock->GetIOHook() && sock->GetIOHook()->prov->creator == mod)
+ {
+ sock->cull();
+ delete sock;
+ }
+ }
+ }
+
CullResult cull() CXX11_OVERRIDE
{
for (insp::intrusive_list<HttpServerSocket>::const_iterator i = sockets.begin(); i != sockets.end(); ++i)