]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
websocket: reset upload_done when sending data
authorStefan Eissing <stefan@eissing.org>
Thu, 4 Sep 2025 10:00:48 +0000 (12:00 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 4 Sep 2025 12:47:15 +0000 (14:47 +0200)
Sending websocket data did not clear the "upload_done" flag of
the initial HTTP Upgrade request, leading to KEEP_SEND never be
cleared. This caused the socket to be polled for INOUT after all
the websocket data had been sent. A busy loop.

Closes #18476

lib/ws.c

index 6070cd6d0d851d21f1f90fbca31819a8d60dafc9..a73ab61b0b47a8fc1e265784fbc5e1961ab1653e 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -1200,6 +1200,7 @@ CURLcode Curl_ws_accept(struct Curl_easy *data,
 
       /* start over with sending */
       data->req.eos_read = FALSE;
+      data->req.upload_done = FALSE;
       k->keepon |= KEEP_SEND;
     }