1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

Force stale connections to be freed, fixes #513.

git-svn-id: file:///home/svn/framework3/trunk@7641 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore 2009-11-29 17:17:24 +00:00
parent bcd7343803
commit bfe2cc0c53

View File

@ -25,13 +25,15 @@ module DBSave
def self.included(mod)
class << mod
def find(*args)
Lock.mutex.synchronize do
ActiveRecord::Base.connection_pool.clear_stale_cached_connections!
Lock.mutex.synchronize do
super(*args)
end
end
def save(*args)
Lock.mutex.synchronize do
ActiveRecord::Base.connection_pool.clear_stale_cached_connections!
Lock.mutex.synchronize do
super(*args)
end
end