summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-11 16:07:52 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-11 16:07:52 +0000
commit7f0a9608c895bf437f746cbca16d9fbad158b782 (patch)
tree42b5715cbdff5b5c8ca865bc90d5e0c02a9b5d2e /src/modules
parent62a145ce248b386f6412108ad1b60a2c5bed46c1 (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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/main.cpp4
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp2
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)