]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove detached requests from the time_order_heap
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Apr 2021 21:48:48 +0000 (22:48 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Apr 2021 21:48:48 +0000 (22:48 +0100)
src/lib/io/worker.c

index f79943f1cb8df8beb3f8b24a849ffbbcc5f4551c..d927307bcdd006f1723baca7f6931ea44ec49c80 100644 (file)
@@ -1004,7 +1004,14 @@ static void _worker_request_done_detached(request_t *request, UNUSED rlm_rcode_t
         *      worker_request_time_tracking_end.
         */
        fr_assert(!fr_heap_entry_inserted(request->runnable_id));
-       fr_assert(!fr_heap_entry_inserted(request->time_order_id));
+
+       /*
+        *      Normally worker_request_time_tracking_end
+        *      would remove the request from the time
+        *      order heap, but we need to do that for
+        *      detached requests.
+        */
+       if (fr_heap_entry_inserted(request->time_order_id)) (void) fr_heap_extract(worker->time_order, request);
 
        /*
         *      Detached requests have to be freed by us