From: Alan T. DeKok Date: Fri, 15 Oct 2010 00:10:18 +0000 (+0200) Subject: Fix corner case when not threaded. X-Git-Tag: release_2_1_11~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5849d7aa697fac412f0c7901bd3a93bdac3885b2;p=thirdparty%2Ffreeradius-server.git Fix corner case when not threaded. If the request is still running after 30s, it's probably because it was proxied, and the home server didn't bother to respond. --- diff --git a/src/main/event.c b/src/main/event.c index 844bdb683f5..84ad8bcd95e 100644 --- a/src/main/event.c +++ b/src/main/event.c @@ -1170,16 +1170,16 @@ static void wait_a_bit(void *ctx) case REQUEST_RUNNING: /* * If we're not thread-capable, OR we're capable, - * but have been told to run without threads, - * complain when the requests is queued for a - * thread, or running in a child thread. + * but have been told to run without threads, and + * the request is still running. This is usually + * because the request was proxied, and the home + * server didn't respond. */ #ifdef HAVE_PTHREAD_H if (!have_children) #endif { - rad_assert("We do not have threads, but the request is marked as queued or running in a child thread" == NULL); - break; + goto done; } #ifdef HAVE_PTHREAD_H @@ -1249,6 +1249,7 @@ static void wait_a_bit(void *ctx) * and clean it up. */ case REQUEST_DONE: + done: #ifdef HAVE_PTHREAD_H request->child_pid = NO_SUCH_CHILD_PID; #endif