From 8469f352d86772ba876452317fb6d0e08479595f Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Tue, 9 Nov 2021 11:35:23 -0500 Subject: [PATCH] Avoid infinite recursion in `timer_callback` (#164) Fixes https://github.com/JuliaLang/Downloads.jl/issues/163 (cherry picked from commit a55825b0815fb22d0e3fe47903a180e9ffa23eab) --- src/Curl/Multi.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Curl/Multi.jl b/src/Curl/Multi.jl index fc865b0..0ef1b63 100644 --- a/src/Curl/Multi.jl +++ b/src/Curl/Multi.jl @@ -123,9 +123,7 @@ function timer_callback( multi = unsafe_pointer_to_objref(multi_p)::Multi @assert multi_h == multi.handle stoptimer!(multi) - if timeout_ms == 0 - do_multi(multi) - elseif timeout_ms >= 0 + if timeout_ms >= 0 multi.timer = Timer(timeout_ms/1000) do timer lock(multi.lock) do multi.timer === timer || return