Permalink
Browse files

retry when tiny

  • Loading branch information...
1 parent 4dcce5f commit 74d8e1e5f84475ffd29d587be0be042de9dfbaaa @gurgeous committed Sep 19, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/sinew/curler.rb
View
@@ -82,6 +82,7 @@ def curl(url, body)
nretries = @options[:retry]
begin
@curl.perform
+ raise "too small" if @curl.body_str.length < 5
rescue Exception => e
retry if (nretries -= 1) > 0
raise e

0 comments on commit 74d8e1e

Please sign in to comment.