ws: handle blocked sends better

Closes #17496
This commit is contained in:
z2_ 2025-05-31 14:22:00 +02:00 committed by Daniel Stenberg
parent 2cf19c245e
commit d1145df24d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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 */