piwebasync/websockets/client.py
async def _start(self) -> None:
        """
        Establish channel connection

        Raises:
            - asyncio.TimeoutError: Operation timed out trying to
            establish connection
            - RuntimeError: Attempted to open channel that is not
            closed or `close` was not called
        """
        if not self.is_closed:
            raise RuntimeError(
                "Cannot open new connection. Client is not closed"
            )

        self._channel_exc = None
        run_channel_task = self._loop.create_task(self._run())
        try:
            await asyncio.wait_for(
                self._channel_open_event.wait(),
                self._open_timeout
            )
        except asyncio.TimeoutError:
            run_channel_task.cancel()
            await run_channel_task
            raise
        # connection established
        self._run_channel_task = run_channel_task
        self._close_channel_task = self._loop.create_task(self._close_channel())
        self._watchdog_task = self._loop.create_task(self._watchdog())
        logger.debug("channel open, all tasks started")
        # ensures all tasks start before recv is called which led to
        # deadlocks in testing
        await asyncio.sleep(0)

        Establish channel connection

        Raises:
            - asyncio.TimeoutError: Operation timed out trying to
            establish connection
            - RuntimeError: Attempted to open channel that is not
            closed or `close` was not called
        
Establish channel connection
Raises:
asyncio.TimeoutError: Operation timed out trying to
establish connection
RuntimeError: Attempted to open channel that is not
closed or `close` was not called
Establish channel connection Raises : asyncio . TimeoutError : Operation timed out trying to establish connection RuntimeError : Attempted to open channel that is not closed or ` close ` was not called
async def _start(self) -> None:
        if not self.is_closed:
            raise RuntimeError(
                "Cannot open new connection. Client is not closed"
            )
        self._channel_exc = None
        run_channel_task = self._loop.create_task(self._run())
        try:
            await asyncio.wait_for(
                self._channel_open_event.wait(),
                self._open_timeout
            )
        except asyncio.TimeoutError:
            run_channel_task.cancel()
            await run_channel_task
            raise
        self._run_channel_task = run_channel_task
        self._close_channel_task = self._loop.create_task(self._close_channel())
        self._watchdog_task = self._loop.create_task(self._watchdog())
        logger.debug("channel open, all tasks started")
        await asyncio.sleep(0)
async def _start ( self ) -> None : if not self . is_closed : raise RuntimeError ( "Cannot open new connection. Client is not closed" ) self . _channel_exc = None run_channel_task = self . _loop . create_task ( self . _run ( ) ) try : await asyncio . wait_for ( self . _channel_open_event . wait ( ) , self . _open_timeout ) except asyncio . TimeoutError : run_channel_task . cancel ( ) await run_channel_task raise self . _run_channel_task = run_channel_task self . _close_channel_task = self . _loop . create_task ( self . _close_channel ( ) ) self . _watchdog_task = self . _loop . create_task ( self . _watchdog ( ) ) logger . debug ( "channel open, all tasks started" ) await asyncio . sleep ( 0 )
Establish channel connection
Raises:
 asyncio.TimeoutError: Operation timed out trying to
establish connection
 RuntimeError: Attempted to open channel that is not
closed or `close` was not called
Establish channel connection Raises : asyncio . TimeoutError : Operation timed out trying to establish connection RuntimeError : Attempted to open channel that is not closed or ` close ` was not called
"""
        Establish channel connection

        Raises:
            - asyncio.TimeoutError: Operation timed out trying to
            establish connection
            - RuntimeError: Attempted to open channel that is not
            closed or `close` was not called
        """ # connection established # ensures all tasks start before recv is called which led to # deadlocks in testing
self