From eef01045c7fe6a4d5e620df88449625fb33076d4 Mon Sep 17 00:00:00 2001 From: Isaac Lewis Date: Thu, 29 Mar 2018 10:01:05 -0700 Subject: [PATCH] re-implement max_num_retries --- lib/syspro/syspro_client.rb | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/syspro/syspro_client.rb b/lib/syspro/syspro_client.rb index 37ba55e..99e10f9 100644 --- a/lib/syspro/syspro_client.rb +++ b/lib/syspro/syspro_client.rb @@ -193,6 +193,8 @@ module Syspro end def self.should_retry?(e, num_retries) + return false if num_retries >= Syspro.max_network_retries + # Retry on timeout-related problems (either on open or read). return true if e.is_a?(Faraday::TimeoutError) -- libgit2 0.21.4