summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
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)