From b9cdd3943e4de479d7baf14204df87f692e1f635 Mon Sep 17 00:00:00 2001 From: gneumann <> Date: Wed, 24 Sep 2008 11:25:33 +0000 Subject: [PATCH] - fix boundary condition for starting threads (there was a problem at least with keepwait > 0 and minthreads = 0) --- nsd/queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nsd/queue.c b/nsd/queue.c index 7fd5481..779099a 100644 --- a/nsd/queue.c +++ b/nsd/queue.c @@ -34,7 +34,7 @@ * and service threads. */ -static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/queue.c,v 1.44 2007/10/26 23:14:17 gneumann Exp $, compiled: " __DATE__ " " __TIME__; +static const char *RCSID = "@(#) $Header: /Users/dossy/Desktop/cvs/aolserver/nsd/queue.c,v 1.45 2008/09/24 11:25:33 gneumann Exp $, compiled: " __DATE__ " " __TIME__; #include "nsd.h" @@ -179,7 +179,7 @@ NsQueueConn(Conn *connPtr) poolPtr->queue.wait.lastPtr = connPtr; connPtr->nextPtr = NULL; - if (poolPtr->queue.wait.num > 0 + if (poolPtr->threads.waiting == 0 && poolPtr->threads.current < poolPtr->threads.max) { /* Create a new thread if no thread is waiting and the number