diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-24 16:52:49 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-24 16:52:49 +0000 |
commit | a0f17e57ccc1d6f7923da8eb6ba8e55d1ea61301 (patch) | |
tree | a911afbf76c347177656347d7b0676c11fa1faab | |
parent | 39b852bb8ef6183414ae06f68929fad6100959e4 (diff) |
Added check to not flush disconnected buffers
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1498 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/connection.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index 7e54e4297..f246a2dac 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -216,7 +216,6 @@ void ircd_connector::ResetPing() // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it) bool ircd_connector::FlushWriteBuf() { - log(DEBUG,"connector::FlushWriteBuf()"); if (this->GetState() == STATE_NOAUTH_OUTBOUND) { // if the outbound socket hasnt connected yet... return true and don't @@ -231,7 +230,7 @@ bool ircd_connector::FlushWriteBuf() // this falls through and sends any waiting data, which can put it into the // connected state. } - if (sendq.length()) + if ((sendq.length()) && (this->GetState() != STATE_DISCONNECTED)) { char* tb = (char*)this->sendq.c_str(); int n_sent = write(this->fd,tb,this->sendq.length()); |