projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c96b395
)
Flag for not reusing connection.
author
Dennis Schafroth
<dennis@indexdata.com>
Fri, 25 Jun 2010 08:23:29 +0000
(10:23 +0200)
committer
Dennis Schafroth
<dennis@indexdata.com>
Fri, 25 Jun 2010 08:23:29 +0000
(10:23 +0200)
src/connection.c
patch
|
blob
|
history
diff --git
a/src/connection.c
b/src/connection.c
index
0d77a90
..
2da26d2
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-471,7
+471,7
@@
int client_prep_connection(struct client *cl,
if (!co)
{
int max_connections = 0;
if (!co)
{
int max_connections = 0;
- int reuse_connection = 0;
+ int reuse_connections = 1;
const char *v = session_setting_oneval(client_get_database(cl),
PZ_MAX_CONNECTIONS);
if (v && *v)
const char *v = session_setting_oneval(client_get_database(cl),
PZ_MAX_CONNECTIONS);
if (v && *v)
@@
-490,8
+490,8
@@
int client_prep_connection(struct client *cl,
int num_connections = 0;
for (co = host->connections; co; co = co->next)
num_connections++;
int num_connections = 0;
for (co = host->connections; co; co = co->next)
num_connections++;
- if (reuse_connection) {
- for (co = host->connections; reuse_connection && co; co = co->next)
+ if (reuse_connections) {
+ for (co = host->connections; co; co = co->next)
{
if (connection_is_idle(co) &&
(!co->client || client_get_state(co->client) == Client_Idle) &&
{
if (connection_is_idle(co) &&
(!co->client || client_get_state(co->client) == Client_Idle) &&