summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-rw-r--r--usr.bin/ssh/serverloop.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 9961170a5b3..8294714d328 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -308,16 +308,20 @@ void process_input(fd_set *readset)
if (FD_ISSET(connection_in, readset))
{
len = read(connection_in, buf, sizeof(buf));
- if (len == 0)
- fatal("Connection closed by remote host.");
+ if (len == 0) {
+ verbose("Connection closed by remote host.");
+ fatal_cleanup();
+ }
/* There is a kernel bug on Solaris that causes select to sometimes
wake up even though there is no data available. */
if (len < 0 && errno == EAGAIN)
len = 0;
- if (len < 0)
- fatal("Read error from remote host: %.100s", strerror(errno));
+ if (len < 0) {
+ verbose("Read error from remote host: %.100s", strerror(errno));
+ fatal_cleanup();
+ }
/* Buffer any received data. */
packet_process_incoming(buf, len);