From: Alan T. DeKok Date: Tue, 21 Feb 2023 20:51:55 +0000 (-0500) Subject: minor changes to debug output X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bec215ea6f00c003f1a57331698de805b692c61;p=thirdparty%2Ffreeradius-server.git minor changes to debug output --- diff --git a/src/lib/io/master.c b/src/lib/io/master.c index ef0ecdf553c..9b014934d82 100644 --- a/src/lib/io/master.c +++ b/src/lib/io/master.c @@ -1897,8 +1897,6 @@ static void client_expiry_timer(fr_event_list_t *el, fr_time_t now, void *uctx) */ if (!el) return; - DEBUG("TIMER - checking status of client %s", client->radclient->shortname); - // @todo - print out what we plan on doing next connection = client->connection; inst = client->inst; @@ -1910,6 +1908,13 @@ static void client_expiry_timer(fr_event_list_t *el, fr_time_t now, void *uctx) * now==0, to signal that we have to *set* the timer. */ if (fr_time_eq(now, fr_time_wrap(0))) { + /* + * The timer is already set, don't do anything. + */ + if (client->ev) return; + + DEBUG("TIMER - setting idle timeout for connection from client %s", client->radclient->shortname); + switch (client->state) { case PR_CLIENT_CONNECTED: fr_assert(connection != NULL); @@ -1936,6 +1941,8 @@ static void client_expiry_timer(fr_event_list_t *el, fr_time_t now, void *uctx) goto reset_timer; } + DEBUG("TIMER - checking status of client %s", client->radclient->shortname); + /* * It's a negative cache entry. Just delete it. */