1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00: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:
Simon Tatham 2012-11-14 18:32:09 +00:00
parent 06b51312c1
commit 3e22c99c9a

View File

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