Skip to content

Commit

Permalink
fix Timer usage (JuliaLang#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski authored and ericphanson committed Jan 26, 2022
1 parent 84bc5c1 commit 47d22f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Curl/Multi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ function remove_handle(multi::Multi, easy::Easy)
if multi.grace <= 0
done!(multi)
elseif 0 < multi.grace < typemax(multi.grace)
multi.timer = Timer(multi.grace/1000) do
multi.timer = Timer(multi.grace/1000) do timer
lock(multi.lock) do
isopen(multi.timer) && done!(multi)
isopen(timer) && done!(multi)
end
end
end
Expand Down Expand Up @@ -114,7 +114,7 @@ function timer_callback(
elseif timeout_ms >= 0
multi.timer = Timer(timeout_ms/1000) do timer
lock(multi.lock) do
isopen(multi.timer) && do_multi(multi)
isopen(timer) && do_multi(multi)
end
end
elseif timeout_ms == -1
Expand Down

0 comments on commit 47d22f6

Please sign in to comment.