Skip to content

Commit

Permalink
do not sleep too long
Browse files Browse the repository at this point in the history
  • Loading branch information
dwinkler1 authored Jun 10, 2022
1 parent 2a51dbd commit a6240af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function ratelimitprotect(response::HTTP.Messages.Response; verbose = false)
resetin = haskey(headers, "X-RateLimit-Reset") ? parse(Int, headers["X-RateLimit-Reset"]) - time() : 60
sleepfor = maximum([0.1, resetin])
verbose && println("Protecting rate limit")
sleep((sleepfor + 5))
sleep((sleepfor + 1))
end
return nothing
end
Expand Down

0 comments on commit a6240af

Please sign in to comment.