mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 18:56:49 +01:00
BSecureSocket: fix read error handling
The current documentation (https://www.openssl.org/docs/man1.1.1/man3/SSL_read.html) says that SSL_read returning 0 should be handled as an error. So, let's do that. Change-Id: I6781826ea700b6e597fd2d444fd96a1a5270c6cf Reviewed-on: https://review.haiku-os.org/c/haiku/+/3620 Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This commit is contained in:
parent
1ccfdb2bd5
commit
7b661b559e
@ -540,7 +540,7 @@ BSecureSocket::Read(void* buffer, size_t size)
|
||||
int retry;
|
||||
do {
|
||||
bytesRead = SSL_read(fPrivate->fSSL, buffer, size);
|
||||
if (bytesRead >= 0)
|
||||
if (bytesRead > 0)
|
||||
return bytesRead;
|
||||
|
||||
if (errno != EINTR) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user