From: Arran Cudbard-Bell Date: Mon, 5 Apr 2021 21:48:48 +0000 (+0100) Subject: Remove detached requests from the time_order_heap X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a3db2fe18a8f8447cbeb19947ab01454dfd7c20;p=thirdparty%2Ffreeradius-server.git Remove detached requests from the time_order_heap --- diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index f79943f1cb..d927307bcd 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -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