1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 14:06:39 +02:00

Handle not being able to completely flush our write buffer correctly

This commit is contained in:
Adam
2010-12-10 01:18:59 -05:00
parent 6ab7cf9689
commit ad5da2a988
+4 -7
View File
@@ -509,15 +509,12 @@ bool BufferedSocket::ProcessRead()
*/
bool BufferedSocket::ProcessWrite()
{
if (WriteBuffer.empty())
{
if (this->WriteBuffer.empty())
return true;
}
if (this->IO->Send(this, WriteBuffer) == -1)
{
int count = this->IO->Send(this, this->WriteBuffer);
if (count == -1)
return false;
}
WriteBuffer.clear();
this->WriteBuffer = this->WriteBuffer.substr(count);
SocketEngine->ClearWritable(this);
return true;