mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Set SSH socket variable to NULL if connect() fails. Failure to do
this was causing PSCP to hang indefinitely after reporting Connection Refused. [originally from svn r1569]
This commit is contained in:
parent
84c3ece865
commit
ae7c314f33
4
ssh.c
4
ssh.c
@ -1873,8 +1873,10 @@ static char *connect_to_host(char *host, int port, char **realhost, int nodelay)
|
||||
logevent(buf);
|
||||
}
|
||||
s = sk_new(addr, port, 0, 1, nodelay, &fn_table_ptr);
|
||||
if ((err = sk_socket_error(s)))
|
||||
if ((err = sk_socket_error(s))) {
|
||||
s = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef FWHACK
|
||||
sk_write(s, "connect ", 8);
|
||||
|
Loading…
Reference in New Issue
Block a user