1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 10:46:38 +02:00

Turn BinarySocket::Write() into a no-op when called with l == 0

This commit is contained in:
Attila Molnar
2014-02-18 03:28:02 +01:00
parent 5beea4eb7e
commit 3883716883
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -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);
}