mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-18 15:33:49 +02:00
Makes sure the loop is running when closing the app.
This commit is contained in:
parent
31b168aa42
commit
5f5d9347b9
@ -46,7 +46,6 @@ class Qemu(BaseManager):
|
||||
:returns: List of folders where Qemu binaries MAY reside.
|
||||
"""
|
||||
|
||||
qemus = []
|
||||
paths = set()
|
||||
try:
|
||||
paths.add(os.getcwd())
|
||||
|
@ -252,7 +252,8 @@ class Server:
|
||||
# TypeError: async() takes 1 positional argument but 3 were given
|
||||
log.warning("TypeError exception in the loop {}".format(e))
|
||||
finally:
|
||||
if self._handler:
|
||||
if self._handler and self._loop.is_running():
|
||||
self._loop.run_until_complete(self._handler.finish_connections())
|
||||
server.close()
|
||||
self._loop.run_until_complete(app.finish())
|
||||
if self._loop.is_running():
|
||||
self._loop.run_until_complete(app.finish())
|
||||
|
Loading…
Reference in New Issue
Block a user