summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/main.cpp7
-rw-r--r--src/modules/m_spanningtree/utils.h4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 7c93e7d45..ce1792a02 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -815,6 +815,13 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod)
sock->Close();
}
}
+
+ for (SpanningTreeUtilities::TimeoutList::const_iterator i = Utils->timeoutlist.begin(); i != Utils->timeoutlist.end(); ++i)
+ {
+ TreeSocket* sock = i->first;
+ if (sock->GetIOHook() == mod)
+ sock->Close();
+ }
}
// note: the protocol does not allow direct umode +o except
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h
index 92a03428f..a0543b6bd 100644
--- a/src/modules/m_spanningtree/utils.h
+++ b/src/modules/m_spanningtree/utils.h
@@ -50,6 +50,8 @@ typedef std::map<TreeServer*,TreeServer*> TreeServerList;
class SpanningTreeUtilities : public classbase
{
public:
+ typedef std::map<TreeSocket*, std::pair<std::string, int> > TimeoutList;
+
/** Creator module
*/
ModuleSpanningTree* Creator;
@@ -90,7 +92,7 @@ class SpanningTreeUtilities : public classbase
server_hash sidlist;
/** List of all outgoing sockets and their timeouts
*/
- std::map<TreeSocket*, std::pair<std::string, int> > timeoutlist;
+ TimeoutList timeoutlist;
/** Holds the data from the <link> tags in the conf
*/
std::vector<reference<Link> > LinkBlocks;