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 */