Merge pull request #273 from mattkirby/pooler_124

(POOLER-124) Fix evaluation of max_tries
This commit is contained in:
mchllweeks 2018-07-09 12:50:34 -07:00 committed by GitHub
commit 6f4f3cc4e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 10 deletions

View file

@ -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