Commit eef01045c7fe6a4d5e620df88449625fb33076d4
1 parent
e3484f8f
re-implement max_num_retries
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
lib/syspro/syspro_client.rb
| ... | ... | @@ -193,6 +193,8 @@ module Syspro |
| 193 | 193 | end |
| 194 | 194 | |
| 195 | 195 | def self.should_retry?(e, num_retries) |
| 196 | + return false if num_retries >= Syspro.max_network_retries | |
| 197 | + | |
| 196 | 198 | # Retry on timeout-related problems (either on open or read). |
| 197 | 199 | return true if e.is_a?(Faraday::TimeoutError) |
| 198 | 200 | ... | ... |