From 8851a551998fac25055e14f73015db64f42daacb Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 7 Jun 2018 22:26:23 +0700 Subject: [PATCH] Fix timeout error with "save as" for large projects. --- gns3server/controller/compute.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py index e5b8ef93..3cb52142 100644 --- a/gns3server/controller/compute.py +++ b/gns3server/controller/compute.py @@ -527,8 +527,8 @@ class Compute: headers=headers )) response = yield from self._session().request(method, url, headers=headers, data=data, auth=self._auth, chunked=chunked, timeout=timeout) - except asyncio.TimeoutError as e: - raise ComputeError("Timeout error when connecting to {}".format(url)) + except asyncio.TimeoutError: + raise ComputeError("Timeout error for {} call to {} after {}s".format(method, url, timeout)) except (aiohttp.ClientError, aiohttp.ServerDisconnectedError, ValueError, KeyError, socket.gaierror) as e: # aiohttp 2.3.1 raises socket.gaierror when cannot find host raise ComputeError(str(e)) @@ -641,7 +641,7 @@ class Compute: List files in the project on computes """ path = "/projects/{}/files".format(project.id) - res = yield from self.http_query("GET", path, timeout=120) + res = yield from self.http_query("GET", path, timeout=None) return res.json @asyncio.coroutine