summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inspsocket.cpp1
-rw-r--r--src/modules/m_spanningtree/main.cpp14
2 files changed, 14 insertions, 1 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 1fbe3b5ab..f06ddf28d 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -131,6 +131,7 @@ void StreamSocket::Close()
ServerInstance->Logs->Log("SOCKET", DEFAULT,"%s threw an exception: %s",
modexcept.GetSource(), modexcept.GetReason());
}
+ IOHook = NULL;
}
ServerInstance->SE->Shutdown(this, 2);
ServerInstance->SE->DelFd(this);
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 7ac67221b..9026d9d02 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -188,7 +188,6 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime)
{
sock->SendError("Ping timeout");
sock->Squit(s,"Ping timeout");
- ServerInstance->SE->DelFd(sock);
sock->Close();
return;
}
@@ -750,6 +749,19 @@ void ModuleSpanningTree::OnLoadModule(Module* mod)
void ModuleSpanningTree::OnUnloadModule(Module* mod)
{
// TODO notify other servers?
+
+ unsigned int items = Utils->TreeRoot->ChildCount();
+ for(unsigned int x = 0; x < items; x++)
+ {
+ TreeServer* srv = Utils->TreeRoot->GetChild(x);
+ TreeSocket* sock = srv->GetSocket();
+ if (sock && sock->GetIOHook() == mod)
+ {
+ sock->SendError("SSL module unloaded");
+ sock->Squit(srv,"SSL module unloaded");
+ sock->Close();
+ }
+ }
}
void ModuleSpanningTree::RedoConfig(Module* mod)