This commit is contained in:
albert
2013-03-22 10:00:46 -07:00
parent fd9ca8d2fc
commit b21dcc47a7

View File

@@ -7,6 +7,7 @@ module Downloads
def initialize(source, file_path)
@source = source
@file_path = file_path
@tries = 0
end
def download!
@@ -75,6 +76,14 @@ module Downloads
end # http.request_get
end # http.start
end # while
rescue Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EIO, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, IOError
@tries += 1
if @tries < 3
retry
else
raise
end
end # def
def fix_image_board_sources