summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-28 14:47:29 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-28 14:47:29 +0200
commit037b0e51fc6c9499defe21ddf35e87db7173d9c9 (patch)
treefccedb8f4a56441b88329ef7f2ec8ae7b7035ae7 /src/modules/m_spanningtree
parent7bef57c770fd5cdfa0ad10caf30273f6e42a90d7 (diff)
m_spanningtree Squit dead servers immediately when they die, not at the next timer tick
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/main.cpp6
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp1
2 files changed, 1 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 0747b96a6..74bbf0b8a 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -169,12 +169,6 @@ restart:
if (s->IsRoot())
continue;
- if (s->GetSocket()->GetLinkState() == DYING)
- {
- s->GetSocket()->Close();
- goto restart;
- }
-
// Do not ping servers that are not fully connected yet!
// Servers which are connected to us have IsLocal() == true and if they're fully connected
// then Socket->LinkState == CONNECTED. Servers that are linked to another server are always fully connected.
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 8dd62a1e9..4e738488b 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -128,6 +128,7 @@ void TreeSocket::OnError(BufferedSocketError e)
ServerInstance->SNO->WriteGlobalSno('l', "Connection to '\002%s\002' failed with error: %s",
linkID.c_str(), getError().c_str());
LinkState = DYING;
+ Close();
}
void TreeSocket::SendError(const std::string &errormessage)