Skip to content

Commit

Permalink
switch over to Mysql2::Client#ping for the mysql2 connection check
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmario authored and tenderlove committed Feb 13, 2011
1 parent 0e9c7a2 commit 7eb554b
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -197,10 +197,7 @@ def disable_referential_integrity(&block) #:nodoc:

def active?
return false unless @connection
@connection.query 'select 1'
true
rescue Mysql2::Error
false
@connection.ping
end

def reconnect!
Expand Down

0 comments on commit 7eb554b

Please sign in to comment.