summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2006-10-11 12:38:04 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2006-10-11 12:38:04 +0000
commitd63429678a7df473c44ba8cdc475167a2def633a (patch)
tree241a105620a08f458724611f8ed589a27468f1ba /usr.bin/ssh/clientloop.c
parentea0721cc0aecc947be12d0196e8fea12cda9a241 (diff)
exit instead of doing a blocking tcp send if we detect a client/server timeout,
since the tcp sendqueue might be already full (of alive requests); ok dtucker, report mpf
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 8c891058f72..acfb8753e38 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.175 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: clientloop.c,v 1.176 2006/10/11 12:38:03 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -456,8 +456,10 @@ client_global_request_reply(int type, u_int32_t seq, void *ctxt)
static void
server_alive_check(void)
{
- if (++server_alive_timeouts > options.server_alive_count_max)
- packet_disconnect("Timeout, server not responding.");
+ if (++server_alive_timeouts > options.server_alive_count_max) {
+ logit("Timeout, server not responding.");
+ cleanup_exit(255);
+ }
packet_start(SSH2_MSG_GLOBAL_REQUEST);
packet_put_cstring("keepalive@openssh.com");
packet_put_char(1); /* boolean: want reply */