1
0
Fork 0
mirror of https://github.com/mperham/connection_pool synced 2023-03-27 23:22:21 -04:00

Hack for #67 to close discarded connections eagerly

This commit is contained in:
Mike Perham 2015-02-25 11:19:21 -08:00
parent 7e3234257e
commit 599f72bc6e

View file

@ -126,6 +126,9 @@ class ConnectionPool::TimedStack
if @shutdown_block if @shutdown_block
@shutdown_block.call(obj) @shutdown_block.call(obj)
else else
if obj.respond_to?(:close)
obj.close rescue nil
end
@created -= 1 @created -= 1
end end