From 3883716883fbcaade9b8f26af8451bf4b6dac66b Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 18 Feb 2014 03:28:02 +0100 Subject: Turn BinarySocket::Write() into a no-op when called with l == 0 --- src/socket_transport.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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); } -- cgit