mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-14 05:18:22 +00:00
Catch 401 error when connecting to a compute websocket
This commit is contained in:
@ -371,8 +371,11 @@ class Compute:
|
|||||||
"""
|
"""
|
||||||
Connect to the notification stream
|
Connect to the notification stream
|
||||||
"""
|
"""
|
||||||
self._ws = yield from self._session().ws_connect(self._getUrl("/notifications/ws"))
|
try:
|
||||||
while True:
|
self._ws = yield from self._session().ws_connect(self._getUrl("/notifications/ws"))
|
||||||
|
except aiohttp.errors.WSServerHandshakeError:
|
||||||
|
self._ws
|
||||||
|
while self._ws is not None:
|
||||||
try:
|
try:
|
||||||
response = yield from self._ws.receive()
|
response = yield from self._ws.receive()
|
||||||
except aiohttp.errors.WSServerHandshakeError:
|
except aiohttp.errors.WSServerHandshakeError:
|
||||||
|
Reference in New Issue
Block a user