Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test2305 (websocket) doesn't handle CURLE_AGAIN #10760

jay opened this issue Mar 14, 2023 · 0 comments

test2305 (websocket) doesn't handle CURLE_AGAIN #10760

jay opened this issue Mar 14, 2023 · 0 comments


Copy link

jay commented Mar 14, 2023

I did this

CI test fails in 2305 likely due to "curl_ws_recv returned 81" (81 == CURLE_AGAIN).

/* Three 4097-bytes frames are expected, 12291 bytes */
while(i < 12291) {
CURLcode result =
curl_ws_recv(curl, buffer, sizeof(buffer), &nread, &meta);
if(result) {
printf("curl_ws_recv returned %d\n", (int)result);
printf("%u: nread %u Age %u Flags %x "
"Bytesleft %" CURL_FORMAT_CURL_OFF_T "\n",
nread, meta->age, meta->flags, meta->offset, meta->bytesleft);
i += meta->len;
fwrite(buffer, 1, nread, save);

I expected the following

It is not documented that curl_ws_recv / send returns CURLE_AGAIN. I assume curl_ws_xxx is much like regular curl_easy_xxx send/recv?

bagder added a commit that referenced this issue Mar 16, 2023
The test does a slightly ugly busy-loop for this case but should be
managable due to it likely being a very short moment.

Mention CURLE_AGAIN in curl_ws_recv.3

Fixes #10760
Reported-by: Jay Satiro
@bagder bagder closed this as completed in f24014c Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

1 participant