]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ws: keep the socket non-blocking
authorDaniel Stenberg <daniel@haxx.se>
Mon, 27 Feb 2023 15:55:57 +0000 (16:55 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 27 Feb 2023 23:38:21 +0000 (00:38 +0100)
Reported-by: marski on github
Fixes #10615
Closes #10625

lib/ws.c

index 0fc5e56aee90cc5b23d37d155f50ea262eb7c8e9..e8495dcfc016a7c3d76b861461e10ba99585ac21 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -166,10 +166,6 @@ CURLcode Curl_ws_accept(struct Curl_easy *data,
   }
   k->upgr101 = UPGR101_RECEIVED;
 
-  if(data->set.connect_only)
-    /* switch off non-blocking sockets */
-    (void)curlx_nonblock(conn->sock[FIRSTSOCKET], FALSE);
-
   return result;
 }
 
@@ -750,9 +746,6 @@ CURLcode Curl_ws_disconnect(struct Curl_easy *data,
   (void)data;
   (void)dead_connection;
   Curl_dyn_free(&wsc->early);
-
-  /* make sure this is non-blocking to avoid getting stuck in shutdown */
-  (void)curlx_nonblock(conn->sock[FIRSTSOCKET], TRUE);
   return CURLE_OK;
 }