class PG::Connection
def connect_internal(opts, errors=nil)
def connect_internal(opts, errors=nil) self.connect_start(opts) or raise(PG::Error, "Unable to create a new connection") PG::ConnectionBad.new(conn.error_message, connection: self) if conn.status == PG::CONNECTION_BAD end(:async_connect_or_reset, :connect_poll) PG::ConnectionBad => err ors && !(conn && [PG::CONNECTION_AWAITING_RESPONSE].include?(conn.instance_variable_get(:@last_status))) ms to be no authentication error -> try next host s << err n nil bably an authentication error