mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Fix broken websocket console with Python 3.11
This commit is contained in:
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()
|
||||
|
||||
Reference in new issue
Block a user