piwebasync/websockets/client.py
async def _watchdog(self) -> None:
        """
        Oversee channel reconnects. Close the channel if unable to reconnect

        If the watchdog times out it will start the channel closing process
        and set the `channel_exc` property. Calls to `recv` will raise a
        `~piwebasync.exceptions.ChannelClosedError` resulting from
        `~piwebasync.exceptions.WatchdogTimeout`
        """
        if self._reconnect:
            logger.debug("watchdog active")
            drops = 0
            while True:
                if self.is_closed or self.is_closing:
                    break
                try:
                    try:
                        logger.debug("waiting for channel open. Drops: %i", drops)
                        await asyncio.wait_for(
                            self._channel_open_event.wait(),
                            self._dead_channel_timeout
                        )
                    except asyncio.TimeoutError as err:
                        exc = WatchdogTimeout()
                        exc.__cause__ = err
                        self._set_channel_exc(exc)
                        self._close_channel_waiter.set_result(None)
                        break
                    await self._no_data_transfer_event.wait()
                    drops += 1
                except asyncio.CancelledError:
                    pass

        Oversee channel reconnects. Close the channel if unable to reconnect

        If the watchdog times out it will start the channel closing process
        and set the `channel_exc` property. Calls to `recv` will raise a
        `~piwebasync.exceptions.ChannelClosedError` resulting from
        `~piwebasync.exceptions.WatchdogTimeout`
        
Oversee channel reconnects. Close the channel if unable to reconnect
If the watchdog times out it will start the channel closing process
and set the `channel_exc` property.
Oversee channel reconnects . Close the channel if unable to reconnect If the watchdog times out it will start the channel closing process and set the ` channel_exc ` property .
async def _watchdog(self) -> None:
        if self._reconnect:
            logger.debug("watchdog active")
            drops = 0
            while True:
                if self.is_closed or self.is_closing:
                    break
                try:
                    try:
                        logger.debug("waiting for channel open. Drops: %i", drops)
                        await asyncio.wait_for(
                            self._channel_open_event.wait(),
                            self._dead_channel_timeout
                        )
                    except asyncio.TimeoutError as err:
                        exc = WatchdogTimeout()
                        exc.__cause__ = err
                        self._set_channel_exc(exc)
                        self._close_channel_waiter.set_result(None)
                        break
                    await self._no_data_transfer_event.wait()
                    drops += 1
                except asyncio.CancelledError:
                    pass
async def _watchdog ( self ) -> None : if self . _reconnect : logger . debug ( "watchdog active" ) drops = 0 while True : if self . is_closed or self . is_closing : break try : try : logger . debug ( "waiting for channel open. Drops: %i" , drops ) await asyncio . wait_for ( self . _channel_open_event . wait ( ) , self . _dead_channel_timeout ) except asyncio . TimeoutError as err : exc = WatchdogTimeout ( ) exc . __cause__ = err self . _set_channel_exc ( exc ) self . _close_channel_waiter . set_result ( None ) break await self . _no_data_transfer_event . wait ( ) drops += 1 except asyncio . CancelledError : pass
Oversee channel reconnects.
Oversee channel reconnects .
"""
        Oversee channel reconnects. Close the channel if unable to reconnect

        If the watchdog times out it will start the channel closing process
        and set the `channel_exc` property. Calls to `recv` will raise a
        `~piwebasync.exceptions.ChannelClosedError` resulting from
        `~piwebasync.exceptions.WatchdogTimeout`
        """
self