mirror of https://gitlab.com/litecord/litecord.git
Fix mypy not catching non-nullability of conn
This commit is contained in:
parent
133154ad1b
commit
6a74a7f990
|
|
@ -185,11 +185,11 @@ class LVSPConnection:
|
||||||
"""Start the websocket."""
|
"""Start the websocket."""
|
||||||
await self.start()
|
await self.start()
|
||||||
|
|
||||||
try:
|
if self.conn is None:
|
||||||
if self.conn is None:
|
log.error("failed to start lvsp connection, stopping")
|
||||||
log.error("failed to start lvsp connection, stopping")
|
return
|
||||||
return
|
|
||||||
|
|
||||||
|
try:
|
||||||
await self._loop()
|
await self._loop()
|
||||||
except websockets.exceptions.ConnectionClosed as err:
|
except websockets.exceptions.ConnectionClosed as err:
|
||||||
log.warning("conn close, {}, err={}", self._log_id, err)
|
log.warning("conn close, {}, err={}", self._log_id, err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue