mirror of
https://github.com/anope/anope.git
synced 2026-07-10 14:23:14 +02:00
Don't try to write to a buffered socket if there's no data.
This can cause the SSL modules to act weirdly because the TLS library will return 0 bytes written (correctly) which is then interpreted as an error.
This commit is contained in:
@@ -42,6 +42,9 @@ bool BufferedSocket::ProcessRead()
|
||||
|
||||
bool BufferedSocket::ProcessWrite()
|
||||
{
|
||||
if (this->write_buffer.empty())
|
||||
return true;
|
||||
|
||||
int count = this->io->Send(this, this->write_buffer);
|
||||
if (count == 0)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user