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

Improve logging for remote server connection lost

Ref https://github.com/GNS3/gns3-gui/issues/2074
This commit is contained in:
Julien Duponchelle 2017-05-22 13:57:32 +02:00
parent 51d6152a5c
commit 4dc55a5af4
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -580,8 +580,10 @@ class Compute:
Forward a call to the emulator on compute
"""
try:
res = yield from self.http_query(method, "/{}/{}".format(type, path), data=data, timeout=None)
action = "/{}/{}".format(type, path)
res = yield from self.http_query(method, action, data=data, timeout=None)
except aiohttp.errors.DisconnectedError:
log.error("Connection lost to %s during %s %s", self._id, method, action)
raise aiohttp.web.HTTPGatewayTimeout()
return res.json