mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Fix another error-reporting bug, in which sk_newlistener would fail to
capture the error code if listen() returned an error, and instead pass 0 (saved from the previous successful bind) to winsock_error_string. [originally from svn r9708]
This commit is contained in:
@ -1289,7 +1289,7 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only,
|
||||
|
||||
if (p_listen(s, SOMAXCONN) == SOCKET_ERROR) {
|
||||
p_closesocket(s);
|
||||
ret->error = winsock_error_string(err);
|
||||
ret->error = winsock_error_string(p_WSAGetLastError());
|
||||
return (Socket) ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user