projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bd461e
)
Avoid writing "Error: rlm_sql (sql): Cannot open new connection, connection spawning...
author
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Wed, 29 Oct 2014 15:54:45 +0000
(11:54 -0400)
committer
Arran Cudbard-Bell
<a.cudbardb@freeradius.org>
Wed, 29 Oct 2014 15:55:07 +0000
(11:55 -0400)
src/main/connection.c
patch
|
blob
|
history
diff --git
a/src/main/connection.c
b/src/main/connection.c
index
c0ee681
..
b894a32
100644
(file)
--- a/
src/main/connection.c
+++ b/
src/main/connection.c
@@
-952,7
+952,11
@@
static int fr_connection_pool_check(fr_connection_pool_t *pool)
/* leave extra alone from above */
}
- if (spawn) {
+ /*
+ * Only try to open spares if we're not already attempting to open
+ * a connection. Avoids spurious log messages.
+ */
+ if (spawn && !pool->spawning) {
INFO("%s: %i of %u connections in use. Need more spares", pool->log_prefix, pool->active, pool->num);
pthread_mutex_unlock(&pool->mutex);
fr_connection_spawn(pool, now, false); /* ignore return code */