From: Daniel Stenberg Date: Mon, 6 Oct 2025 12:59:53 +0000 (+0200) Subject: telnet: return error if WSAEventSelect fails X-Git-Tag: rc-8_17_0-3~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d9636abd1deea39c7a79f042ca60652a815ddc8;p=thirdparty%2Fcurl.git telnet: return error if WSAEventSelect fails Reported-by: Joshua Rogers Closes #18886 --- diff --git a/lib/telnet.c b/lib/telnet.c index 1ae15d3704..5144a1afa1 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -1371,7 +1371,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done) /* Tell Winsock what events we want to listen to */ if(WSAEventSelect(sockfd, event_handle, FD_READ|FD_CLOSE) == SOCKET_ERROR) { WSACloseEvent(event_handle); - return CURLE_OK; + return CURLE_RECV_ERROR; } /* The get the Windows file handle for stdin */