git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12370
e03df62e-2008-0410-955e-
edbf42e46eb7
* WAIT_AUTH_2: indicates that the socket is inbound
* but has not yet sent and received
* SERVER strings.
* WAIT_AUTH_2: indicates that the socket is inbound
* but has not yet sent and received
* SERVER strings.
- * CONNECTED: represents a fully authorized, fully
+ * CONNECTED: represents a fully authorized, fully
+ * DYING: represents a server that has had an error.
-enum ServerState { CONNECTING, WAIT_AUTH_1, WAIT_AUTH_2, CONNECTED };
+enum ServerState { CONNECTING, WAIT_AUTH_1, WAIT_AUTH_2, CONNECTED, DYING };
void TreeSocket::SendError(const std::string &errormessage)
{
WriteLine("ERROR :"+errormessage);
void TreeSocket::SendError(const std::string &errormessage)
{
WriteLine("ERROR :"+errormessage);
+ DoWrite();
+ LinkState = DYING;
SetError(errormessage);
}
SetError(errormessage);
}
if (!getError().empty())
break;
}
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;
}
SendError("RecvQ overrun (line too long)");
Utils->Creator->loopCall = false;
}
*/
this->ProcessConnectedLine(prefix, command, params);
break;
*/
this->ProcessConnectedLine(prefix, command, params);
break;