mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-29 18:28:11 +00:00
Avoid leaving unfinished task behind us
This commit is contained in:
parent
b5ab53bbe9
commit
0f85fbd5f2
@ -303,12 +303,14 @@ class Compute:
|
||||
response = yield from self._run_http_query("GET", "/version")
|
||||
|
||||
if "version" not in response.json:
|
||||
self._http_session.close()
|
||||
raise aiohttp.web.HTTPConflict(text="The server {} is not a GNS3 server".format(self._id))
|
||||
self._version = response.json["version"]
|
||||
if parse_version(__version__)[:2] != parse_version(response.json["version"])[:2]:
|
||||
self._http_session.close()
|
||||
raise aiohttp.web.HTTPConflict(text="The server {} versions are not compatible {} != {}".format(self._id, __version__, response.json["version"]))
|
||||
|
||||
self._notifications = asyncio.async(self._connect_notification())
|
||||
self._notifications = asyncio.gather(self._connect_notification())
|
||||
self._connected = True
|
||||
self._controller.notification.emit("compute.updated", self.__json__())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user