]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
synchronous interpreter: Decrement yielded count on stopped requests
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 18 Mar 2023 04:35:58 +0000 (00:35 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 27 Mar 2023 22:59:40 +0000 (16:59 -0600)
src/lib/unlang/interpret_synchronous.c

index c65dbd3bc2cd4499c0e75b08c1a654667824fe9c..a8c881f882561ff739a01578444ea4c6772b5855 100644 (file)
@@ -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