From 8f6d24ae5ee97bc6a644a60515ee6b317743af54 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 29 Sep 2016 14:10:57 +0200 Subject: [PATCH] Prevent a dead lock when closing server --- gns3server/controller/__init__.py | 2 +- gns3server/controller/node.py | 2 +- gns3server/controller/project.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py index 8dab9463..f624ab1c 100644 --- a/gns3server/controller/__init__.py +++ b/gns3server/controller/__init__.py @@ -89,7 +89,7 @@ class Controller: try: yield from compute.close() # We don't care if a compute is down at this step - except aiohttp.errors.ClientOSError: + except (aiohttp.errors.ClientOSError, aiohttp.web_exceptions.HTTPError): pass yield from self.gns3vm.exit_vm() self._computes = {} diff --git a/gns3server/controller/node.py b/gns3server/controller/node.py index 63da385d..ada38202 100644 --- a/gns3server/controller/node.py +++ b/gns3server/controller/node.py @@ -389,7 +389,7 @@ class Node: try: yield from self.post("/stop") # We don't care if a compute is down at this step - except (aiohttp.errors.ClientOSError, aiohttp.errors.ClientHttpProcessingError, aiohttp.web.HTTPNotFound, aiohttp.web.HTTPConflict): + except (aiohttp.errors.ClientOSError, aiohttp.errors.ClientHttpProcessingError, aiohttp.web.HTTPError): pass @asyncio.coroutine diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index f5bbfd7b..8637c946 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -531,7 +531,7 @@ class Project: try: yield from compute.post("/projects/{}/close".format(self._id)) # We don't care if a compute is down at this step - except (aiohttp.errors.ClientOSError, aiohttp.web.HTTPNotFound, aiohttp.web.HTTPConflict): + except (aiohttp.errors.ClientOSError, aiohttp.web.HTTPError): pass self._cleanPictures() self._status = "closed"