]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 11 Aug 2017 04:16:35 +0000 (04:16 +0000)
committerDamien Miller <djm@mindrot.org>
Sat, 12 Aug 2017 06:47:10 +0000 (16:47 +1000)
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

serverloop.c

index 4b8d5ba68d55f9dd543cad879d32c645cf6ab822..5cc3fc099e542db5df403f0937887f5a93736dd9 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.194 2017/08/11 03:58:36 dtucker Exp $ */
+/* $OpenBSD: serverloop.c,v 1.195 2017/08/11 04:16:35 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * 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,
                } else if (FD_ISSET(connection_in, *readsetp)) {
                        last_client_time = now;
                } else if (last_client_time != 0 && last_client_time +
-                   options.client_alive_interval < now) {
+                   options.client_alive_interval <= now) {
                        client_alive_check();
                        last_client_time = now;
                }