summaryrefslogtreecommitdiff
path: root/src/sockets.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-23 18:50:27 -0500
committerAdam <Adam@anope.org>2010-12-23 18:50:27 -0500
commit15d29edae9d2115f5096886d16ba6ccd5598cec3 (patch)
treeaf36e1b31f026ebc888078a919a84bc529bfb244 /src/sockets.cpp
parent3009540a00d392912affea5f2545134e2f657c01 (diff)
Do not clear want write on a socket if we are unable to completely write its buffer
Diffstat (limited to 'src/sockets.cpp')
-rw-r--r--src/sockets.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sockets.cpp b/src/sockets.cpp
index e980056f5..d15d292cb 100644
--- a/src/sockets.cpp
+++ b/src/sockets.cpp
@@ -515,7 +515,8 @@ bool BufferedSocket::ProcessWrite()
if (count == -1)
return false;
this->WriteBuffer = this->WriteBuffer.substr(count);
- SocketEngine->ClearWritable(this);
+ if (this->WriteBuffer.empty())
+ SocketEngine->ClearWritable(this);
return true;
}