Don't try to remove websocket from log listeners if it had not been added
This commit is contained in:
parent
2b8a5353be
commit
30a6dd62ef
@ -133,6 +133,7 @@ async def log_websocket(request: web.Request) -> web.WebSocketResponse:
|
||||
await ws.close()
|
||||
except Exception:
|
||||
pass
|
||||
if authenticated:
|
||||
handler.listeners.remove(ws)
|
||||
log.debug(f"Connection from {request.remote} closed")
|
||||
sockets.remove(ws)
|
||||
|
Loading…
Reference in New Issue
Block a user