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:
parent
bcd7343803
commit
bfe2cc0c53
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user