summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2017-08-11 04:16:35 +0000
committerDamien Miller <djm@mindrot.org>2017-08-12 16:47:10 +1000
commit42a8f8bc288ef8cac504c5c73f09ed610bc74a34 (patch)
tree1e48210bdd738a49d32e38da1693798da296c9ad
parentb60ff20051ef96dfb207b6bfa45c0ad6c34a542a (diff)
upstream commit
Tweak previous keepalive commit: if last_time + keepalive <= now instead of just "<" so client_alive_check will fire if the select happens to return on exact second of the timeout. ok djm@ Upstream-ID: e02756bd6038d11bb8522bfd75a4761c3a684fcc
-rw-r--r--serverloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c
index 4b8d5ba68..5cc3fc099 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.194 2017/08/11 03:58:36 dtucker Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.195 2017/08/11 04:16:35 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -277,7 +277,7 @@ wait_until_can_do_something(int connection_in, int connection_out,
277 } else if (FD_ISSET(connection_in, *readsetp)) { 277 } else if (FD_ISSET(connection_in, *readsetp)) {
278 last_client_time = now; 278 last_client_time = now;
279 } else if (last_client_time != 0 && last_client_time + 279 } else if (last_client_time != 0 && last_client_time +
280 options.client_alive_interval < now) { 280 options.client_alive_interval <= now) {
281 client_alive_check(); 281 client_alive_check();
282 last_client_time = now; 282 last_client_time = now;
283 } 283 }