Call fr_connection_manage() when doing fr_connection_get...()
authorAlan T. DeKok <aland@freeradius.org>
Mon, 27 Oct 2014 21:32:47 +0000 (17:32 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 27 Oct 2014 21:32:47 +0000 (17:32 -0400)
Which means that idle connections are deleted, instead of handing
them to the caller

src/main/connection.c

index dcbbac2..324a5dc 100644 (file)
@@ -1003,6 +1003,8 @@ static void *fr_connection_get_internal(fr_connection_pool_t *pool, int spawn)
 
        now = time(NULL);
        for (this = pool->head; this != NULL; this = this->next) {
+               if (!fr_connection_manage(pool, this, now)) continue;
+
                if (!this->in_use) goto do_return;
        }
        rad_assert(pool->active == pool->num);