]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Disarm the curl I/O timer instead of deleting it
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 22 Apr 2025 18:35:48 +0000 (13:35 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 22 Apr 2025 18:44:00 +0000 (13:44 -0500)
src/lib/curl/io.c

index a775c09e85bbb878126579eab73059b70eff72ec..8c706381576bcf2a7e05efe6238e5d1d2c15676a 100644 (file)
@@ -277,10 +277,7 @@ static int _fr_curl_io_timer_modify(CURLM *mandle, long timeout_ms, void *ctx)
        fr_curl_handle_t        *mhandle = talloc_get_type_abort(ctx, fr_curl_handle_t);
 
        if (timeout_ms < 0) {
-               if (fr_timer_delete(&mhandle->ev) < 0) {
-                       PERROR("Failed deleting multi-handle timer");
-                       return -1;
-               }
+               if (!fr_cond_assert_msg(fr_timer_disarm(mhandle->ev) == 0, "Failed disarming curl timer")) return -1;
                DEBUG3("multi-handle %p - Timer removed", mandle);
                return 0;
        }