diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-11 16:07:52 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-11 16:07:52 +0000 |
commit | 7f0a9608c895bf437f746cbca16d9fbad158b782 (patch) | |
tree | 42b5715cbdff5b5c8ca865bc90d5e0c02a9b5d2e | |
parent | 62a145ce248b386f6412108ad1b60a2c5bed46c1 (diff) |
Restart server_hash iteration after quitting dead and pinged out servers
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12435 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index e744b675a..3e5e2beb9 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -147,6 +147,7 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) */ long ts = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000); +restart: for (server_hash::iterator i = Utils->serverlist.begin(); i != Utils->serverlist.end(); i++) { TreeServer *s = i->second; @@ -156,6 +157,7 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) s->GetSocket()->SendError("Ping timeout"); s->GetSocket()->Squit(s,"Ping timeout"); s->GetSocket()->Close(); + goto restart; } // Fix for bug #792, do not ping servers that are not connected yet! @@ -196,7 +198,7 @@ void ModuleSpanningTree::DoPingChecks(time_t curtime) sock->SendError("Ping timeout"); sock->Squit(s,"Ping timeout"); sock->Close(); - return; + goto restart; } } } diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index ea87c615f..5efa58f3b 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -137,7 +137,7 @@ void TreeSocket::OnError(BufferedSocketError e) { ServerInstance->SNO->WriteGlobalSno('l', "Connection to \002%s\002 failed with error: %s", myhost.c_str(), getError().c_str()); - ServerInstance->GlobalCulls.AddItem(this); + LinkState = DYING; } void TreeSocket::SendError(const std::string &errormessage) |