diff options
Diffstat (limited to 'src/modules/m_spanningtree/treesocket1.cpp')
-rw-r--r-- | src/modules/m_spanningtree/treesocket1.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index 23d1e46cd..ea87c615f 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -143,6 +143,8 @@ void TreeSocket::OnError(BufferedSocketError e) void TreeSocket::SendError(const std::string &errormessage) { WriteLine("ERROR :"+errormessage); + DoWrite(); + LinkState = DYING; SetError(errormessage); } @@ -233,7 +235,7 @@ void TreeSocket::OnDataReady() if (!getError().empty()) break; } - if (getError().empty() && recvq.length() > 4096) + if (LinkState != CONNECTED && recvq.length() > 4096) SendError("RecvQ overrun (line too long)"); Utils->Creator->loopCall = false; } |