diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-11-21 00:44:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-21 00:44:19 +0200 |
commit | 55c073c253ea57f43caec7779efc72f773c4560c (patch) | |
tree | cfd4cbd2a1fb80d0e14ce5444d1d3dfa8efe7ea5 /libnetdata/socket | |
parent | 284f6f3aa4f36cefad2601c490510621496c2b53 (diff) |
remove retries from SSL (#14026)
remove retries
Diffstat (limited to 'libnetdata/socket')
-rw-r--r-- | libnetdata/socket/socket.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c index 6c288f505d..40271b6237 100644 --- a/libnetdata/socket/socket.c +++ b/libnetdata/socket/socket.c @@ -925,11 +925,11 @@ ssize_t netdata_ssl_read(SSL *ssl, void *buf, size_t num) { int bytes, err, retries = 0; - do { + //do { bytes = SSL_read(ssl, buf, (int)num); err = SSL_get_error(ssl, bytes); retries++; - } while (bytes <= 0 && (err == SSL_ERROR_WANT_READ)); + //} while (bytes <= 0 && (err == SSL_ERROR_WANT_READ)); if(unlikely(bytes <= 0)) error("SSL_read() returned %d bytes, SSL error %d", bytes, err); @@ -946,7 +946,7 @@ ssize_t netdata_ssl_write(SSL *ssl, const void *buf, size_t num) { int bytes, err, retries = 0; size_t total = 0; - do { + //do { bytes = SSL_write(ssl, (uint8_t *)buf + total, (int)(num - total)); err = SSL_get_error(ssl, bytes); retries++; @@ -954,13 +954,13 @@ ssize_t netdata_ssl_write(SSL *ssl, const void *buf, size_t num) { if(bytes > 0) total += bytes; - } while ((bytes <= 0 && (err == SSL_ERROR_WANT_WRITE)) || (bytes > 0 && total < num)); + //} while ((bytes <= 0 && (err == SSL_ERROR_WANT_WRITE)) || (bytes > 0 && total < num)); if(unlikely(bytes <= 0)) - error("SSL_read() returned %d bytes, SSL error %d", bytes, err); + error("SSL_write() returned %d bytes, SSL error %d", bytes, err); if(retries > 1) - error_limit(&erl, "SSL_read() retried %d times", retries); + error_limit(&erl, "SSL_write() retried %d times", retries); return bytes; } |