diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-29 13:15:20 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-11-29 14:02:58 -0800 |
commit | 134cc8f9398a9a67b80f3cc26651dcc5c073416c (patch) | |
tree | 68e3d5d2fc7bc831700466951f8ffce86e75ec4f /activerecord/lib | |
parent | 9bf8bf82b9d8614d9c7ccc31892887f6a79ce2f5 (diff) | |
download | rails-134cc8f9398a9a67b80f3cc26651dcc5c073416c.tar.gz rails-134cc8f9398a9a67b80f3cc26651dcc5c073416c.tar.bz2 rails-134cc8f9398a9a67b80f3cc26651dcc5c073416c.zip |
Leased connections return false on second lease
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 4a9653c08c..deb24fd393 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -73,8 +73,10 @@ module ActiveRecord def lease synchronize do - @in_use = true - @last_use = Time.now + unless in_use + @in_use = true + @last_use = Time.now + end end end |