INNER CODE UNIT · Python
wait_disconnect
psevensas/DjangoChannelsGraphqlWs · channels_graphql_ws/client.py:290
async def wait_disconnect(self, timeout=None):
"""Wait server to close the connection.
Args:
timeout: Seconds to wait the connection to close.
Raises:
`asyncio.TimeoutError` when timeout is reached.
"""
await self._transport.wait_disconnect(timeout)
self._is_connected = False
def _is_ping_pong_message(self, response):
"""Check if GQL response is "ping" or "pong" ("keepalive" for
"graphql-ws" subprotocol)."""
msg_type = response.get("type")
return (