From a0f17e57ccc1d6f7923da8eb6ba8e55d1ea61301 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 24 May 2005 16:52:49 +0000 Subject: [PATCH] Added check to not flush disconnected buffers git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1498 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/connection.cpp | 3 +-- 1 file changed, 1 insertion(+), 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()); -- 2.39.5