mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Merge pull request #273 from mattkirby/pooler_124
(POOLER-124) Fix evaluation of max_tries
This commit is contained in:
commit
6f4f3cc4e7
2 changed files with 3 additions and 10 deletions
|
|
@ -404,10 +404,10 @@ module Vmpooler
|
|||
metrics.increment('connect.open')
|
||||
return connection
|
||||
rescue => err
|
||||
try += 1
|
||||
metrics.increment('connect.fail')
|
||||
raise err if try == max_tries
|
||||
raise err if try >= max_tries
|
||||
sleep(try * retry_factor)
|
||||
try += 1
|
||||
retry
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue