From: Arran Cudbard-Bell Date: Sat, 18 Mar 2023 04:35:58 +0000 (-0400) Subject: synchronous interpreter: Decrement yielded count on stopped requests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=018807e8efb767923701416ffee373e1173052bc;p=thirdparty%2Ffreeradius-server.git synchronous interpreter: Decrement yielded count on stopped requests --- diff --git a/src/lib/unlang/interpret_synchronous.c b/src/lib/unlang/interpret_synchronous.c index c65dbd3bc2c..a8c881f8825 100644 --- a/src/lib/unlang/interpret_synchronous.c +++ b/src/lib/unlang/interpret_synchronous.c @@ -104,7 +104,12 @@ static void _request_stop(request_t *request, void *uctx) RDEBUG3("Synchronous request stopped"); - fr_heap_extract(&intps->runnable, request); + /* + * The assumption here is that if the request + * not in the runnable queue, and it's not + * currently running, then it must be yielded. + */ + if (fr_heap_extract(&intps->runnable, request) < 0) intps->yielded--; } /** Request is now runnable