aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-18 21:12:42 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-18 21:15:20 -0300
commitdfeeecd2f3bde70f22174843ccfc594610b4eebc (patch)
tree249d0ebc85790617a1e055d0e9c2a35fe403ba01
parent57cf426e614be55c167b7e6ff04728da21ba5d33 (diff)
downloadrails-dfeeecd2f3bde70f22174843ccfc594610b4eebc.tar.gz
rails-dfeeecd2f3bde70f22174843ccfc594610b4eebc.tar.bz2
rails-dfeeecd2f3bde70f22174843ccfc594610b4eebc.zip
Merge pull request #16542 from seamusabshere/numerify-pool-checkout-timeout-from-urls-4-1-stable
Make sure :checkout_timeout and :dead_connection_timeout are numbers Conflicts: activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index a5fa9d6adc..bc1a670b42 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -234,7 +234,7 @@ module ActiveRecord
@spec = spec
- @checkout_timeout = spec.config[:checkout_timeout] || 5
+ @checkout_timeout = (spec.config[:checkout_timeout] && spec.config[:checkout_timeout].to_f) || 5
@reaper = Reaper.new self, spec.config[:reaping_frequency]
@reaper.run