From c6ed5885ba8841a746c98a79635998c8890e73f1 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 20 Apr 2012 08:32:41 +0200 Subject: updated some documentation changed pool db connection allocation strategy --- pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pool.c') diff --git a/pool.c b/pool.c index 49b7c70..5ad56c5 100644 --- a/pool.c +++ b/pool.c @@ -166,7 +166,7 @@ int psql_pool_release( PgConnPool *pool, PGconn *conn ) res = pthread_mutex_lock( &pool->lock ); if( res < 0 ) return res; - for( i = 1; i < pool->size; i++ ) { + for( i = pool->size; i >= 0; i-- ) { if( pool->conns[i] == conn ) { break; } -- cgit v1.2.3-54-g00ecf