summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/main.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}
}