From: Dennis Schafroth Date: Thu, 6 May 2010 09:25:51 +0000 (+0200) Subject: Fix max_connection when ulimited. X-Git-Tag: v1.4.1~32 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=37661ecc1c5339115d61c6468bc528ee4c2b91f2;p=pazpar2-moved-to-github.git Fix max_connection when ulimited. The actual block should also disabled when running ulimited. --- diff --git a/src/connection.c b/src/connection.c index bfa764e..a936090 100644 --- a/src/connection.c +++ b/src/connection.c @@ -513,13 +513,13 @@ int client_prep_connection(struct client *cl, } yaz_log(YLOG_LOG, "num_connections = %d (waiting) max = %d", num_connections, max_connections); - } - if (yaz_cond_wait(host->cond_ready, host->mutex, abstime)) - { - yaz_log(YLOG_LOG, "out of connections %s", client_get_url(cl)); - client_set_state(cl, Client_Error); - yaz_mutex_leave(host->mutex); - return 0; + if (yaz_cond_wait(host->cond_ready, host->mutex, abstime)) + { + yaz_log(YLOG_LOG, "out of connections %s", client_get_url(cl)); + client_set_state(cl, Client_Error); + yaz_mutex_leave(host->mutex); + return 0; + } } } if (co)