1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-12 19:38:57 +00:00

Avoid a crash when the connection with the server close

This commit is contained in:
Julien Duponchelle 2017-02-23 17:54:01 +01:00
parent 5bfa864f0c
commit 3fb24dd895
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -426,7 +426,7 @@ class Compute:
except aiohttp.errors.WSServerHandshakeError:
self._ws = None
break
if response.tp == aiohttp.MsgType.closed or response.tp == aiohttp.MsgType.error:
if response.tp == aiohttp.MsgType.closed or response.tp == aiohttp.MsgType.error or response.data is None:
self._connected = False
break
msg = json.loads(response.data)