From dbef7a7c6441322e71440a1c6a02a8b8c9b1750d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 5 Aug 2025 13:10:16 +0100 Subject: [PATCH] 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. --- src/socket_transport.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/socket_transport.cpp b/src/socket_transport.cpp index 287e60450..75fdd7f44 100644 --- a/src/socket_transport.cpp +++ b/src/socket_transport.cpp @@ -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;