diff options
Diffstat (limited to 'libnetdata')
-rw-r--r-- | libnetdata/socket/security.c | 5 |
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; |