fixes #978
This commit is contained in:
@@ -7,6 +7,7 @@ module Downloads
|
|||||||
def initialize(source, file_path)
|
def initialize(source, file_path)
|
||||||
@source = source
|
@source = source
|
||||||
@file_path = file_path
|
@file_path = file_path
|
||||||
|
@tries = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
def download!
|
def download!
|
||||||
@@ -75,6 +76,14 @@ module Downloads
|
|||||||
end # http.request_get
|
end # http.request_get
|
||||||
end # http.start
|
end # http.start
|
||||||
end # while
|
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
|
end # def
|
||||||
|
|
||||||
def fix_image_board_sources
|
def fix_image_board_sources
|
||||||
|
|||||||
Reference in New Issue
Block a user