def _on_handshake_fail()

in pyignite/connection/connection.py [0:0]


    def _on_handshake_fail(self, err):
        self.failed = True

        if isinstance(err, AuthenticationError):
            logger.error("Authentication failed while connecting to node(address=%s, port=%d): %s",
                         self.host, self.port, err)
            if self._enabled_connection_listener:
                self._connection_listener.publish_authentication_fail(self.host, self.port, self.protocol_context, err)
        else:
            logger.error("Failed to perform handshake, connection to node(address=%s, port=%d) "
                         "with protocol context %s failed: %s",
                         self.host, self.port, self.protocol_context, err, exc_info=True)
            if self._enabled_connection_listener:
                self._connection_listener.publish_handshake_fail(self.host, self.port, self.protocol_context, err)