Update notification_handler.py

Force close websocket tcp socket.
pull/2358/head
John Fleming 3 months ago committed by GitHub
parent d94adf4c8f
commit 8a459a4821
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -82,6 +82,11 @@ class NotificationHandler:
log.info("Client has disconnected from controller WebSocket")
if not ws.closed:
await ws.close()
try:
# call close to force close ws transport. Unknown root cause as of yet.
ws._req.transport.close()
except:
pass
request.app['websockets'].discard(ws)
return ws

Loading…
Cancel
Save