1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Catch 401 error when connecting to a compute websocket

This commit is contained in:
Julien Duponchelle 2016-08-31 09:59:50 +02:00
parent 9fc23f07f1
commit ff61f79a88
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -371,8 +371,11 @@ class Compute:
"""
Connect to the notification stream
"""
self._ws = yield from self._session().ws_connect(self._getUrl("/notifications/ws"))
while True:
try:
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:
response = yield from self._ws.receive()
except aiohttp.errors.WSServerHandshakeError: