]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
telnet: return error if WSAEventSelect fails
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2025 12:59:53 +0000 (14:59 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Oct 2025 21:35:59 +0000 (23:35 +0200)
Reported-by: Joshua Rogers
Closes #18886

lib/telnet.c

index 1ae15d3704bd60befb47d7e57f0235271416948d..5144a1afa11e29778816875a4e4e8d063b817ca5 100644 (file)
@@ -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 */