async def connect(self):
if not self._consumer:<EOL><INDENT>waiter = self._waiter = asyncio.Future()<EOL>try:<EOL><INDENT>address = self._websocket_host()<EOL>self.logger.info('<STR_LIT>', address)<EOL>self._consumer = await self.http.get(address)<EOL>if self._consumer.status_code != <NUM_LIT>:<EOL><INDENT>raise PusherError("<STR_LIT>")<EOL><DEDENT><DEDENT>except Exception as exc:<EOL><INDENT>waiter.set_exception(exc)<EOL>raise<EOL><DEDENT>else:<EOL><INDENT>await waiter<EOL><DEDENT><DEDENT>return self._consumer<EOL>
Connect to a Pusher websocket