summaryrefslogtreecommitdiff
path: root/src/socket_transport.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-18 03:28:02 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-18 03:28:02 +0100
commit3883716883fbcaade9b8f26af8451bf4b6dac66b (patch)
tree93785cca887dbea0c0f7200e87eae9f98a47dd0b /src/socket_transport.cpp
parent5beea4eb7ebb8938cc2ef73cbb16e215897d0708 (diff)
Turn BinarySocket::Write() into a no-op when called with l == 0
Diffstat (limited to 'src/socket_transport.cpp')
-rw-r--r--src/socket_transport.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socket_transport.cpp b/src/socket_transport.cpp
index 6293ea385..1476d0662 100644
--- a/src/socket_transport.cpp
+++ b/src/socket_transport.cpp
@@ -167,6 +167,8 @@ bool BinarySocket::ProcessWrite()
void BinarySocket::Write(const char *buffer, size_t l)
{
+ if (l == 0)
+ return;
this->write_buffer.push_back(new DataBlock(buffer, l));
SocketEngine::Change(this, true, SF_WRITABLE);
}