summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-23 23:10:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-23 23:10:16 +0000
commitf12fd5382fef6aa5c6f75b2614460089a9af9f27 (patch)
tree71d48061564c7de3a9c6050a3a2ace97dd70e142 /src/modules/m_spanningtree
parent05670eb4a92765ec954f81e775419cff7efcd87c (diff)
Fix crash on unload of modules with listening sockets -- some situations require that the socket cull list is purged *immediately*, provide facility for this.
Also squish some silly error output on unloading spanningtree. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7529 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp3
-rw-r--r--src/modules/m_spanningtree/treesocket2.cpp3
-rw-r--r--src/modules/m_spanningtree/utils.cpp1
3 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 4d960cf8a..c987cb590 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -212,6 +212,9 @@ void TreeSocket::OnError(InspSocketError e)
{
Link* MyLink;
+ if (this->LinkState == LISTENER)
+ return;
+
switch (e)
{
case I_ERR_CONNECT:
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp
index dcfb2b4aa..23362ca99 100644
--- a/src/modules/m_spanningtree/treesocket2.cpp
+++ b/src/modules/m_spanningtree/treesocket2.cpp
@@ -1501,6 +1501,9 @@ void TreeSocket::OnTimeout()
void TreeSocket::OnClose()
{
+ if (this->LinkState == LISTENER)
+ return;
+
// Connection closed.
// If the connection is fully up (state CONNECTED)
// then propogate a netsplit to all peers.
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 9d4fbf41a..bfd46ef03 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -202,6 +202,7 @@ SpanningTreeUtilities::~SpanningTreeUtilities()
}
}
delete TreeRoot;
+ ServerInstance->InspSocketCull();
}
void SpanningTreeUtilities::AddThisServer(TreeServer* server, TreeServerList &list)