From 24a5473aa3d6a24adbd65641e37b91ce5e57b3dc Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 19 Oct 2017 19:49:14 +1100 Subject: [PATCH] chore: only sleep before a retry, not after --- lib/pact_broker/client/retry.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pact_broker/client/retry.rb b/lib/pact_broker/client/retry.rb index ffdc6108..aebfd088 100644 --- a/lib/pact_broker/client/retry.rb +++ b/lib/pact_broker/client/retry.rb @@ -23,8 +23,8 @@ def self.until_true options = {} rescue RescuableError => e tries += 1 $stderr.puts "Error making request - #{e.message}, attempt #{tries} of #{max_tries}" - sleep options raise e if max_tries == tries + sleep options end end end