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:
parent
7e3234257e
commit
599f72bc6e
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue