1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-26 00:38:10 +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: except aiohttp.errors.WSServerHandshakeError:
self._ws = None self._ws = None
break 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 self._connected = False
break break
msg = json.loads(response.data) msg = json.loads(response.data)