X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fconnection.c;h=2da26d2a281b8e1ce85296782589112d31825bbe;hb=8fde5c03bce75ffa06df59eedae1e3c417817af4;hp=0d77a9099b4ce657ab6f3a62ce4398faa3431245;hpb=84a59bac11f3eece56bb0f4cf107dcd462798cea;p=pazpar2-moved-to-github.git diff --git a/src/connection.c b/src/connection.c index 0d77a90..2da26d2 100644 --- 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; - int reuse_connection = 0; + int reuse_connections = 1; 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++; - 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) &&