nats/aio/client.py
def _flusher(self):
        """
        Coroutine which continuously tries to consume pending commands
        and then flushes them to the socket.
        """
        while True:
            if not self.is_connected or self.is_connecting:
                break

            try:
                yield from self._flush_queue.get()

                if self._pending_data_size > 0:
                    self._io_writer.writelines(self._pending[:])
                    self._pending = []
                    self._pending_data_size = 0
                    yield from self._io_writer.drain()
            except OSError as e:
                if self._error_cb is not None:
                    yield from self._error_cb(e)
                yield from self._process_op_err(e)
                break
            except asyncio.CancelledError:
                break
def _flusher(self):
        while True:
            if not self.is_connected or self.is_connecting:
                break

            try:
                yield from self._flush_queue.get()

                if self._pending_data_size > 0:
                    self._io_writer.writelines(self._pending[:])
                    self._pending = []
                    self._pending_data_size = 0
                    yield from self._io_writer.drain()
            except OSError as e:
                if self._error_cb is not None:
                    yield from self._error_cb(e)
                yield from self._process_op_err(e)
                break
            except asyncio.CancelledError:
                break
def _flusher ( self ) : while True : if not self . is_connected or self . is_connecting : break try : yield from self . _flush_queue . get ( ) if self . _pending_data_size > 0 : self . _io_writer . writelines ( self . _pending [ : ] ) self . _pending = [ ] self . _pending_data_size = 0 yield from self . _io_writer . drain ( ) except OSError as e : if self . _error_cb is not None : yield from self . _error_cb ( e ) yield from self . _process_op_err ( e ) break except asyncio . CancelledError : break
Coroutine which continuously tries to consume pending commands
        and then flushes them to the socket.
Coroutine which continuously tries to consume pending commands and then flushes them to the socket .