nats/aio/client.py
def _process_op_err(self, e):
        """
        Process errors which occured while reading or parsing
        the protocol. If allow_reconnect is enabled it will
        try to switch the server to which it is currently connected
        otherwise it will disconnect.
        """
        if self.is_connecting or self.is_closed or self.is_reconnecting:
            return

        if self.options["allow_reconnect"] and self.is_connected:
            self._status = Client.RECONNECTING
            self._ps.reset()

            if self._reconnection_task is not None and not self._reconnection_task.cancelled():
                # Cancel the previous task in case it may still be running.
                self._reconnection_task.cancel()

            self._reconnection_task = self._loop.create_task(self._attempt_reconnect())
        else:
            self._process_disconnect()
            self._err = e
            yield from self._close(Client.CLOSED, True)
def _process_op_err(self, e):
        if self.is_connecting or self.is_closed or self.is_reconnecting:
            return

        if self.options["allow_reconnect"] and self.is_connected:
            self._status = Client.RECONNECTING
            self._ps.reset()

            if self._reconnection_task is not None and not self._reconnection_task.cancelled():
                # Cancel the previous task in case it may still be running.
                self._reconnection_task.cancel()

            self._reconnection_task = self._loop.create_task(self._attempt_reconnect())
        else:
            self._process_disconnect()
            self._err = e
            yield from self._close(Client.CLOSED, True)
def _process_op_err ( self , e ) : if self . is_connecting or self . is_closed or self . is_reconnecting : return if self . options [ "allow_reconnect" ] and self . is_connected : self . _status = Client . RECONNECTING self . _ps . reset ( ) if self . _reconnection_task is not None and not self . _reconnection_task . cancelled ( ) : # Cancel the previous task in case it may still be running. self . _reconnection_task . cancel ( ) self . _reconnection_task = self . _loop . create_task ( self . _attempt_reconnect ( ) ) else : self . _process_disconnect ( ) self . _err = e yield from self . _close ( Client . CLOSED , True )
Process errors which occured while reading or parsing
        the protocol. If allow_reconnect is enabled it will
        try to switch the server to which it is currently connected
        otherwise it will disconnect.
Process errors which occured while reading or parsing the protocol . If allow_reconnect is enabled it will try to switch the server to which it is currently connected otherwise it will disconnect .