diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2023-06-20 21:55:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 21:55:51 +0300 |
commit | 16a4dc97f9f9726e8d54883211add9b0592529be (patch) | |
tree | df0ac85064bf09d1a5490aa8fdec17eda85555f2 /streaming/sender.c | |
parent | a8da69781970b585e2b4af58f763dfb240445d92 (diff) |
Fix SSL non-blocking retry handling in the web server (#15222)
* readers should be able to recursively acquire the lock, even when there is a writer waiting
* log failure to establish connection
* debug log on streaming sender
* log the length of the message
* log recv_timeout()
* debug
* debug
* debug ssl read
* log SSL_get_error() responses
* handle EWOULDBLOCK in web_client_receive()
* make the web server handle EWOULDBLOCK case for SSL
* remove debug statements
* handle more errno values
Diffstat (limited to 'streaming/sender.c')
-rw-r--r-- | streaming/sender.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/streaming/sender.c b/streaming/sender.c index e75ee11896..b565244b1e 100644 --- a/streaming/sender.c +++ b/streaming/sender.c @@ -555,7 +555,7 @@ static bool rrdpush_sender_connect_ssl(struct sender_state *s) { return true; } - // failed to establish connection + error("SSL: failed to establish connection."); return false; #else @@ -709,7 +709,7 @@ static bool rrdpush_sender_thread_connect_to_parent(RRDHOST *host, int default_p if(!rrdpush_sender_connect_ssl(s)) return false; - ssize_t bytes; + ssize_t bytes, len = strlen(http); bytes = send_timeout( #ifdef ENABLE_HTTPS @@ -717,7 +717,7 @@ static bool rrdpush_sender_thread_connect_to_parent(RRDHOST *host, int default_p #endif s->rrdpush_sender_socket, http, - strlen(http), + len, 0, timeout); @@ -731,8 +731,6 @@ static bool rrdpush_sender_thread_connect_to_parent(RRDHOST *host, int default_p return false; } - // info("STREAM %s [send to %s]: waiting response from remote netdata...", rrdhost_hostname(host), s->connected_to); - bytes = recv_timeout( #ifdef ENABLE_HTTPS &host->sender->ssl, |