summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-27 18:46:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-27 18:46:20 +0000
commitc933bf105b0de89e3fd524517daf163a16dd0d44 (patch)
tree50cb525f946e4ac65a416178766e2e124167a40f /web
parentReleasing debian version 1.40.0-2. (diff)
downloadnetdata-c933bf105b0de89e3fd524517daf163a16dd0d44.tar.xz
netdata-c933bf105b0de89e3fd524517daf163a16dd0d44.zip
Merging upstream version 1.40.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web')
-rw-r--r--web/server/web_client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/server/web_client.c b/web/server/web_client.c
index 6e3c1225..5dcff0b0 100644
--- a/web/server/web_client.c
+++ b/web/server/web_client.c
@@ -1933,6 +1933,8 @@ ssize_t web_client_receive(struct web_client *w)
// do we have any space for more data?
buffer_need_bytes(w->response.data, NETDATA_WEB_REQUEST_INITIAL_SIZE);
+ errno = 0;
+
#ifdef ENABLE_HTTPS
if ( (!web_client_check_unix(w)) && (netdata_ssl_web_server_ctx) ) {
if (SSL_connection(&w->ssl)) {
@@ -1962,6 +1964,10 @@ ssize_t web_client_receive(struct web_client *w)
debug(D_WEB_CLIENT, "%llu: Received %zd bytes.", w->id, bytes);
debug(D_WEB_DATA, "%llu: Received data: '%s'.", w->id, &w->response.data->buffer[old]);
}
+ else if(unlikely(bytes < 0 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR))) {
+ web_client_enable_wait_receive(w);
+ return 0;
+ }
else if (bytes < 0) {
debug(D_WEB_CLIENT, "%llu: receive data failed.", w->id);
WEB_CLIENT_IS_DEAD(w);