diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-13 17:20:56 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-13 17:20:56 +0000 |
commit | 7d075564787cbde9bf05aca8b1cd5b10ea978c05 (patch) | |
tree | cab469a1a2a1c271d3bbd7be81e84d16437b2ca7 | |
parent | 6655a0d80e988c06188e8d7f5a4bb965884ba88f (diff) |
Fix double-invocation of Squit that can cause a crash on delink
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12451 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 3e5e2beb9..ee2118915 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -154,8 +154,6 @@ restart: if (s->GetSocket() && s->GetSocket()->GetLinkState() == DYING) { - s->GetSocket()->SendError("Ping timeout"); - s->GetSocket()->Squit(s,"Ping timeout"); s->GetSocket()->Close(); goto restart; } @@ -196,7 +194,6 @@ restart: if (sock) { sock->SendError("Ping timeout"); - sock->Squit(s,"Ping timeout"); sock->Close(); goto restart; } @@ -776,7 +773,6 @@ void ModuleSpanningTree::OnUnloadModule(Module* mod) if (sock && sock->GetIOHook() == mod) { sock->SendError("SSL module unloaded"); - sock->Squit(srv,"SSL module unloaded"); sock->Close(); } } diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 5efa58f3b..79da951b6 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -205,6 +205,7 @@ void TreeSocket::Squit(TreeServer* Current, const std::string &reason) Current->GetParent()->DelChild(Current); Current->cull(); delete Current; + Current = NULL; if (LocalSquit) ServerInstance->SNO->WriteToSnoMask('l', "Netsplit complete, lost \002%d\002 user%s on \002%d\002 server%s.", num_lost_users, num_lost_users != 1 ? "s" : "", num_lost_servers, num_lost_servers != 1 ? "s" : ""); else |