summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2002-01-10 11:13:29 +0000
committermarkus <markus@openbsd.org>2002-01-10 11:13:29 +0000
commite86b930e238de885fdc1c7e26561565042164414 (patch)
tree28c97fa5e17cf87b56bcc4210b5b821b9c8ae82b /usr.bin/ssh/serverloop.c
parentremove duplicated decl of PF_INET6. found by kjc (diff)
downloadwireguard-openbsd-e86b930e238de885fdc1c7e26561565042164414.tar.xz
wireguard-openbsd-e86b930e238de885fdc1c7e26561565042164414.zip
skip client_alive_check until there are channels; ok beck@
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-rw-r--r--usr.bin/ssh/serverloop.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index c4e0082aa2b..f89d943530b 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: serverloop.c,v 1.93 2001/12/28 15:06:00 markus Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.94 2002/01/10 11:13:29 markus Exp $");
#include "xmalloc.h"
#include "packet.h"
@@ -209,15 +209,21 @@ make_packets_from_stdout_data(void)
static void
client_alive_check(void)
{
+ static int had_channel = 0;
int id;
+ id = channel_find_open();
+ if (id == -1) {
+ if (!had_channel)
+ return;
+ packet_disconnect("No open channels after timeout!");
+ }
+ had_channel = 1;
+
/* timeout, check to see how many we have had */
if (++client_alive_timeouts > options.client_alive_count_max)
packet_disconnect("Timeout, your session not responding.");
- id = channel_find_open();
- if (id == -1)
- packet_disconnect("No open channels after timeout!");
/*
* send a bogus channel request with "wantreply",
* we should get back a failure