mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05: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);
|
logevent(buf);
|
||||||
}
|
}
|
||||||
s = sk_new(addr, port, 0, 1, nodelay, &fn_table_ptr);
|
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;
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef FWHACK
|
#ifdef FWHACK
|
||||||
sk_write(s, "connect ", 8);
|
sk_write(s, "connect ", 8);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user