mirror of https://gitlab.com/litecord/litecord.git
gateway: only send payload if ws exists
This commit is contained in:
parent
6e9ddd89f8
commit
7374091dec
|
|
@ -127,6 +127,7 @@ class GatewayState:
|
||||||
log.debug("dispatching event {!r} to session {}", payload["t"], self.session_id)
|
log.debug("dispatching event {!r} to session {}", payload["t"], self.session_id)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if self.ws:
|
||||||
await self.ws.send(payload)
|
await self.ws.send(payload)
|
||||||
except websockets.exceptions.ConnectionClosed as exc:
|
except websockets.exceptions.ConnectionClosed as exc:
|
||||||
log.warning(
|
log.warning(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue