diff options
author | Yoshioka Tsuneo <yoshiokatsuneo@gmail.com> | 2015-01-13 13:49:40 +0900 |
---|---|---|
committer | Yoshioka Tsuneo <yoshiokatsuneo@gmail.com> | 2015-01-13 13:49:40 +0900 |
commit | 33fdb7f2929f57f7453299f231b2762954212611 (patch) | |
tree | 33421801bc38afa9c60ccdac23ca47fcc05449a4 /activerecord/lib/active_record/connection_adapters | |
parent | 205a561e50c89f7b81336a295f97209d741cfa67 (diff) | |
download | rails-33fdb7f2929f57f7453299f231b2762954212611.tar.gz rails-33fdb7f2929f57f7453299f231b2762954212611.tar.bz2 rails-33fdb7f2929f57f7453299f231b2762954212611.zip |
ActiveRecord: On reconnection failure, release only failed connetion.
On reconnection failure, all the connection was released.
But, it is better to release only failed connection.
This patch changes not to release all the connection but release
only failed connection.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 3 |
1 files changed, 2 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 6b5081b7a9..d99dc9a5db 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -454,7 +454,8 @@ module ActiveRecord end c rescue - disconnect! + remove c + c.disconnect! raise end end |