lib/httpx/timers.rb in httpx-1.2.2 vs lib/httpx/timers.rb in httpx-1.2.3

- old
+ new

@@ -95,10 +95,13 @@ end def elapse(elapsed) @interval -= elapsed - @callbacks.each(&:call) if @interval <= 0 + if @interval <= 0 + cb = @callbacks.dup + cb.each(&:call) + end @interval end end private_constant :Interval