Skip to content

Commit

Permalink
prevent duplicate errors from being loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
tompesman committed Mar 15, 2013
1 parent 7451cbf commit fbb11b7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/push/daemon/database_reconnectable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ module Daemon
module DatabaseReconnectable
def adaptor_errors
errors = [ActiveRecord::StatementInvalid, ActiveRecord::ConnectionNotEstablished]
errors << PG::Error if defined?(PG::Error)
errors << PGError if defined?(PGError)
errors << Mysql2::Error if defined?(Mysql2)
if defined?(::PG::Error)
errors << ::PG::Error
elsif defined?(::PGError)
errors << ::PGError
end
errors << ::Mysql2::Error if defined?(::Mysql2)
errors
end

Expand Down

0 comments on commit fbb11b7

Please sign in to comment.