summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}