From 0e118bb789b8830af06842d715d5206554b6e0d9 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 6 Jun 2014 01:46:21 +0200 Subject: m_spanningtree Fix cleanup of connections when unloading a module that provides an IOHook --- src/modules/m_spanningtree/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index d702ab4a2..e7ff3789b 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -806,6 +806,7 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod) { ServerInstance->PI->SendMetaData(NULL, "modules", "-" + mod->ModuleSourceFile); +restart: unsigned int items = Utils->TreeRoot->ChildCount(); for(unsigned int x = 0; x < items; x++) { @@ -815,6 +816,8 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod) { sock->SendError("SSL module unloaded"); sock->Close(); + // XXX: The list we're iterating is modified by TreeSocket::Squit() which is called by Close() + goto restart; } } -- cgit v1.2.3