mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +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:
parent
06b51312c1
commit
3e22c99c9a
@ -1289,7 +1289,7 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only,
|
|||||||
|
|
||||||
if (p_listen(s, SOMAXCONN) == SOCKET_ERROR) {
|
if (p_listen(s, SOMAXCONN) == SOCKET_ERROR) {
|
||||||
p_closesocket(s);
|
p_closesocket(s);
|
||||||
ret->error = winsock_error_string(err);
|
ret->error = winsock_error_string(p_WSAGetLastError());
|
||||||
return (Socket) ret;
|
return (Socket) ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user