projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b59ffc
)
Initialize "last_used" when spawning a new connection
author
Alan T. DeKok
<aland@freeradius.org>
Sun, 6 Nov 2011 09:21:52 +0000
(10:21 +0100)
committer
Alan T. DeKok
<aland@freeradius.org>
Sun, 6 Nov 2011 09:21:52 +0000
(10:21 +0100)
src/main/connection.c
patch
|
blob
|
history
diff --git
a/src/main/connection.c
b/src/main/connection.c
index
9ca230a
..
5459393
100644
(file)
--- a/
src/main/connection.c
+++ b/
src/main/connection.c
@@
-215,6
+215,7
@@
static fr_connection_t *fr_connection_spawn(fr_connection_pool_t *fc,
pthread_mutex_lock(&fc->mutex);
this->number = fc->count++;
+ this->last_used = now;
fr_connection_link(fc, this);
fc->num++;
fc->spawning = FALSE;
@@
-338,13
+339,6
@@
fr_connection_pool_t *fr_connection_pool_init(CONF_SECTION *parent,
fr_connection_pool_delete(fc);
return NULL;
}
-
- /*
- * If we don't set last_used here, the connection
- * will be closed as idle, the first time
- * get_connecton is called.
- */
- this->last_used = now;
}
return fc;