X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ssh.c;h=5ad1ea4a69ec2d014763b53217c01b38cee2e42e;hb=9b15a8010102fc83dcd7eef78014a65f11619d63;hp=4849d91d34e8c57d368a12405f83fa0f5ef6623b;hpb=6017418fcab1c236ca3e550dce5ba97e2beef9bd;p=PuTTY.git diff --git a/ssh.c b/ssh.c index 4849d91d..5ad1ea4a 100644 --- a/ssh.c +++ b/ssh.c @@ -1153,11 +1153,11 @@ static int ssh_receive(Socket skt, int urgent, char *data, int len) { if (urgent==3) { /* A socket error has occurred. */ ssh_state = SSH_STATE_CLOSED; + sk_close(s); s = NULL; connection_fatal(data); - len = 0; - } - if (!len) { + return 0; + } else if (!len) { /* Connection has closed. */ ssh_state = SSH_STATE_CLOSED; sk_close(s);