We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d0c611f + e7aee60 commit f651aa0Copy full SHA for f651aa0
td/stream.py
@@ -636,7 +636,12 @@ async def _connect(self) -> websockets.WebSocketClientProtocol:
636
# If we are connected then login.
637
if is_connected:
638
await self._send_message(login_request)
639
- return self.connection
+ while True:
640
+ response = await self._receive_message(return_value=True)
641
+ responses = response.get('response')
642
+ for r in responses:
643
+ if r.get('service') == 'ADMIN' and r.get('command') == 'LOGIN':
644
+ return self.connection
645
646
async def _check_connection(self) -> bool:
647
"""Determines if we have an active connection
0 commit comments