ws: fix a blocking curl_ws_send() to report written length correctly

Fixes #21372
Reported-by: Yiwei Hou
Clkoses #21373
This commit is contained in:
Stefan Eissing 2026-04-19 10:10:58 +02:00 committed by Daniel Stenberg
parent 9e38e06769
commit ebed4aaf01
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -1749,6 +1749,8 @@ static CURLcode ws_send_raw(struct Curl_easy *data, const void *buffer,
if(result)
return result;
result = ws_send_raw_blocking(data, ws, buffer, buflen);
if(!result)
*pnwritten = buflen;
}
else {
/* We need any pending data to be sent or EAGAIN this call. */