From b24bb42a66a924c72a1f33bf455366a5e1e94357 Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 19 Mar 2020 18:02:01 +1030 Subject: [PATCH] Allow controller to reconnect to compute if communication is lost. Ref #1634 --- gns3server/controller/compute.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py index 419d3e07..1e7c55ac 100644 --- a/gns3server/controller/compute.py +++ b/gns3server/controller/compute.py @@ -448,11 +448,11 @@ class Compute: log.error("Error received on compute WebSocket '{}': {}".format(ws_url, ws.exception())) elif response.type == aiohttp.WSMsgType.CLOSED: pass - self._connected = False break except aiohttp.client_exceptions.ClientResponseError as e: log.error("Client response error received on compute WebSocket '{}': {}".format(ws_url,e)) finally: + self._connected = False log.info("Connection closed to compute WebSocket '{}'".format(ws_url)) # Try to reconnect after 1 second if server unavailable only if not during tests (otherwise we create a ressources usage bomb)