From 57c69e343d69d26adcb4efae44857e50256a216d Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Mar 2006 18:35:25 +0000 Subject: Close-pending checks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3673 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/socket.cpp b/src/socket.cpp index 4ae2f6768..7be8c353a 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -254,6 +254,8 @@ void InspSocket::MarkAsClosed() // and should be aborted. int InspSocket::Write(const std::string &data) { + if (this->ClosePending) + return false; /* Try and append the data to the back of the queue, and send it on its way */ outbuffer.push_back(data); @@ -262,6 +264,9 @@ int InspSocket::Write(const std::string &data) bool InspSocket::FlushWriteBuffer() { + if (this->ClosePending) + return true; + if ((this->fd > -1) && (this->state == I_CONNECTED)) { if (outbuffer.size()) -- cgit v1.2.3