Fix broken websocket console with Python 3.11

This commit is contained in:
grossmj committed 2023-02-18 15:32:57 +08:00
1 parent 30c85703c8
commit 1f85abb036
2 files changed
+17 -1

No files matched your search

@@ -29,6 +29,9 @@ from gns3server.schemas.node import (
NODE_DUPLICATE_SCHEMA
)
import logging
log = logging.getLogger(__name__)
class NodeHandler:
"""
@@ -500,6 +503,8 @@ class NodeHandler:
await ws.send_bytes(msg.data)
elif msg.type == aiohttp.WSMsgType.ERROR:
break
except ConnectionResetError:
log.info("Websocket console connection with compute disconnected")
finally:
if not ws.closed:
await ws.close()