summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:21:39 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:21:39 +1100
commit056cf73d35e36521f5d8c9e799f1d21c6976d99c (patch)
treedac7547ef819f3fdfd38da0fade4eeb402a78e10
parent76765c0b1ad147f747f088a37ae120413108356f (diff)
- markus@cvs.openbsd.org 2002/01/10 11:13:29
[serverloop.c] skip client_alive_check until there are channels; ok beck@
-rw-r--r--ChangeLog5
-rw-r--r--serverloop.c14
2 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ad9e3fbd..3826cd03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -110,6 +110,9 @@
[channels.c nchan.c]
replace buffer_consume(b, buffer_len(b)) with buffer_clear(b);
ok provos@
+ - markus@cvs.openbsd.org 2002/01/10 11:13:29
+ [serverloop.c]
+ skip client_alive_check until there are channels; ok beck@
20020121
@@ -7258,4 +7261,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1754 2002/01/22 12:21:15 djm Exp $
+$Id: ChangeLog,v 1.1755 2002/01/22 12:21:39 djm Exp $
diff --git a/serverloop.c b/serverloop.c
index 0c75b05c..39d99205 100644
--- a/serverloop.c
+++ b/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