ws: keep the socket non-blocking

Reported-by: marski on github
Fixes #10615
Closes #10625
This commit is contained in:
Daniel Stenberg 2023-02-27 16:55:57 +01:00
parent 788c6b3864
commit 3b23dbeec1
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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;
}