Skip to content
Browse files

Just like :pool, make sure :checkout_timeout and :dead_connection_tim…

…eout are numbers

Using #to_f instead of #to_i because they are specified in seconds instead of milliseconds
  • Loading branch information...
1 parent 28c1a81 commit cff9608f11abe37b8ae1ea42379bfb17d78f28c4 @seamusabshere seamusabshere committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
View
4 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -236,8 +236,8 @@ def initialize(spec)
@spec = spec
- @checkout_timeout = spec.config[:checkout_timeout] || 5
- @dead_connection_timeout = spec.config[:dead_connection_timeout] || 5
+ @checkout_timeout = (spec.config[:checkout_timeout] && spec.config[:checkout_timeout].to_f) || 5
+ @dead_connection_timeout = (spec.config[:dead_connection_timeout] && spec.config[:dead_connection_timeout].to_f) || 5
@reaper = Reaper.new self, spec.config[:reaping_frequency]
@reaper.run

0 comments on commit cff9608

Please sign in to comment.
Something went wrong with that request. Please try again.