=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keyscan.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- src/usr.bin/ssh/ssh-keyscan.c 2002/02/22 12:20:34 1.34 +++ src/usr.bin/ssh/ssh-keyscan.c 2002/03/04 18:30:23 1.35 @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.34 2002/02/22 12:20:34 markus Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.35 2002/03/04 18:30:23 stevesk Exp $"); #include #include @@ -484,6 +484,11 @@ if (n < 0) { if (errno != ECONNREFUSED) error("read (%s): %s", c->c_name, strerror(errno)); + conrecycle(s); + return; + } + if (n == 0) { + error("%s: Connection closed by remote host", c->c_name); conrecycle(s); return; }