From: z2_ <88509734+z2-2z@users.noreply.github.com> Date: Sat, 31 May 2025 12:22:00 +0000 (+0200) Subject: ws: handle blocked sends better X-Git-Tag: curl-8_14_1~24 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1145df24de8f80e6b167fbc4f28b86bcd0c6832;p=thirdparty%2Fcurl.git ws: handle blocked sends better Closes #17496 --- diff --git a/lib/ws.c b/lib/ws.c index 93ec3a785a..61ab5019fd 100644 --- a/lib/ws.c +++ b/lib/ws.c @@ -1384,6 +1384,10 @@ CURL_EXTERN CURLcode curl_ws_send(CURL *d, const void *buffer_arg, if(n < 0 && (result != CURLE_AGAIN)) goto out; ws->sendbuf_payload += Curl_bufq_len(&ws->sendbuf) - prev_len; + if(!ws->sendbuf_payload) { + result = CURLE_AGAIN; + goto out; + } } /* flush, blocking when in callback */