summaryrefslogtreecommitdiffstats
path: root/libnetdata/socket
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-13 09:05:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-13 09:05:54 +0000
commit9900e305cf4109599775213d14edc842d5fad8b5 (patch)
tree490b94f8d18f44abcb02f09b2b5ed5a2b2cf4174 /libnetdata/socket
parentReleasing debian version 1.42.2-1. (diff)
downloadnetdata-9900e305cf4109599775213d14edc842d5fad8b5.tar.xz
netdata-9900e305cf4109599775213d14edc842d5fad8b5.zip
Merging upstream version 1.42.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/socket')
-rw-r--r--libnetdata/socket/security.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libnetdata/socket/security.c b/libnetdata/socket/security.c
index c1bb76345..3a3a171e5 100644
--- a/libnetdata/socket/security.c
+++ b/libnetdata/socket/security.c
@@ -234,6 +234,11 @@ ssize_t netdata_ssl_read(NETDATA_SSL *ssl, void *buf, size_t num) {
if(unlikely(bytes <= 0)) {
int err = SSL_get_error(ssl->conn, bytes);
+ if (err == SSL_ERROR_ZERO_RETURN) {
+ ssl->ssl_errno = err;
+ return 0;
+ }
+
if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) {
ssl->ssl_errno = err;
errno = EWOULDBLOCK;