diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-11 18:35:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-11 18:35:25 +0000 |
commit | 57c69e343d69d26adcb4efae44857e50256a216d (patch) | |
tree | 6f36d1032ac0302625e8def04f476c41f8cf14da /src | |
parent | 7ae96519141a7aac4ef2597fb2eed75643f9c1bf (diff) |
Close-pending checks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3673 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/socket.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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()) |