From 37287ad6643bad9967d433086e7a42fef03f6d44 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 4 Apr 2017 16:27:59 +0000 Subject: [PATCH] Add explanatory comment --- ncat/ncat_listen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ncat/ncat_listen.c b/ncat/ncat_listen.c index 3ce60dc0a..6721a00d9 100644 --- a/ncat/ncat_listen.c +++ b/ncat/ncat_listen.c @@ -344,6 +344,7 @@ static int ncat_listen_stream(int proto) if (o.idletimeout > 0) ms_to_timeval(tvp, o.idletimeout); + /* The idle timer should only be running when there are active connections */ if (get_conn_count()) fds_ready = fselect(client_fdlist.fdmax + 1, &readfds, &writefds, NULL, tvp); else @@ -809,6 +810,7 @@ static int ncat_listen_dgram(int proto) if (o.idletimeout > 0) ms_to_timeval(tvp, o.idletimeout); + /* The idle timer should only be running when there are active connections */ if (get_conn_count()) fds_ready = fselect(listen_fdlist.fdmax + 1, &fds, NULL, NULL, tvp); else