Add cleanup_delay configuration item with a default of five seconds
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 6 Nov 2011 01:17:29 +0000 (02:17 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 6 Nov 2011 01:25:00 +0000 (02:25 +0100)
without this we always end up cleaning up start-spare connections
on the first few requests.

src/main/connection.c

index 4cfa980..9ca230a 100644 (file)
@@ -102,7 +102,9 @@ static const CONF_PARSER connection_config[] = {
          0, "0" },
        { "lifetime", PW_TYPE_INTEGER, offsetof(fr_connection_pool_t, lifetime),
          0, "0" },
-       { "idle_timeout",    PW_TYPE_INTEGER, offsetof(fr_connection_pool_t, idle_timeout),
+       { "cleanup_delay", PW_TYPE_INTEGER, offsetof(fr_connection_pool_t, cleanup_delay),
+         0, "5" },
+       { "idle_timeout",  PW_TYPE_INTEGER, offsetof(fr_connection_pool_t, idle_timeout),
          0, "60" },
        { "lazy",     PW_TYPE_BOOLEAN, offsetof(fr_connection_pool_t, lazy_init),
          0, NULL },