]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Set last_write_success when a connection becomes connected
authorNick Porter <nick@portercomputing.co.uk>
Thu, 25 Jun 2026 15:41:43 +0000 (16:41 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 25 Jun 2026 15:42:44 +0000 (16:42 +0100)
To give a base time that idle timeouts can be calculated from.

src/lib/server/trunk.c

index 918aed5a18235ea374b812d61956851356e9a0ca..1acce256acdacc2d09c56ab3c2d47affb27635b9 100644 (file)
@@ -3537,6 +3537,13 @@ static void _trunk_connection_on_connected(UNUSED connection_t *conn,
         */
        trunk->pub.last_connected = fr_time();
 
+       /*
+        *      Set last_write_success so that idle timeout checks will run
+        *      from when the connection has connected if they fire before
+        *      any requests are written, rather than from server start time.
+        */
+       tconn->pub.last_write_success = fr_time();
+
        /*
         *      Insert a timer to reconnect the
         *      connection periodically.