Files
metasploit-gs/lib/msf/core/rpc/v10
Luke Imhoff 21fad7163d Msf::DBManager#connection_established?
MSP-9653

Calling `ActiveRecord::Base.establish_connection`, followed by
`ActiveRecord::Base.connected?` returns false unless some other code
requires a connection to be checked out first.  The correct way to check
if the spec passed to `ActiveRecord::Base.establish_connection` is to
checkout a connection and then ask if it is active.
`Msf::DBManager#connection_established?` does the checkout, active check
and checkin, and should be used in place of
`ActiveRecord::Base.connected?` and
`ActiveRecord::Base.connection_pool.connected?`.
`Msf::DBManager#active` should still be used as it also checks for
adapter/driver usability and that migrations have run.
2014-06-02 12:49:09 -05:00
..
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00
2013-08-30 16:28:33 -05:00