Don't backoff for more than 256 seconds (~4 min) (#13)

master v1.2.1
Prad Nelluru 3 years ago committed by GitHub
parent ebf1b57e22
commit 5e5158fe1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/muse-dl.cr

@ -83,7 +83,9 @@ module Muse::Dl
puts ex.backtrace.join("\n ")
puts "Error. Skipping book: #{url}. Waiting for #{delay_secs} seconds before continuing."
sleep(delay_secs)
delay_secs *= 2
if delay_secs < 256
delay_secs *= 2
end
end
end
elsif parser.url

Loading…
Cancel
Save