feature #1303: downloader retries writing when the uncompress command is busy

This commit is contained in:
Javi Fontan committed 2012-06-15 18:12:43 +02:00
1 parent fe0ed3c06c
commit df71bfa3ab
1 file changed
+12 -3
+12 -3
View File
@@ -89,9 +89,18 @@ class Stream
def process(data)
begin
@compr_in.write(data)
@compr_in.flush
rescue Errno::EPIPE
try=5
begin
@compr_in.write(data)
@compr_in.flush
rescue
if try>0
try-=1
sleep 0.1
retry
end
end
rescue
STDERR.puts "Error uncompressing image."
exit(-1)
end