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.
1 parent 0a2828c commit 50c5d70Copy full SHA for 50c5d70
interactions/api/gateway/websocket.py
@@ -124,7 +124,7 @@ def average_latency(self) -> float:
124
@property
125
def latency(self) -> float:
126
"""Get the latency of the connection."""
127
- return self._latency[-1]
+ return self._latency[-1] if self._latency else float("inf")
128
129
130
def loop(self) -> asyncio.AbstractEventLoop:
0 commit comments