mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fixes asyncio Lock instantiation issues on Windows.
Because the event loop is essentially a global variable, asyncio Lock objects that get instantiated early could grab a reference to the wrong loop (Selector instead of Proactor).
This commit is contained in:
1 parent
666064f1ae
commit
708f66b608
2 files changed
+4
-2
No files matched your search
@@ -44,10 +44,11 @@ class BaseManager:
|
||||
Responsible of management of a VM pool
|
||||
"""
|
||||
|
||||
_convert_lock = asyncio.Lock()
|
||||
_convert_lock = None
|
||||
|
||||
def __init__(self):
|
||||
|
||||
BaseManager._convert_lock = asyncio.Lock()
|
||||
self._vms = {}
|
||||
self._port_manager = None
|
||||
self._config = Config.instance()
|
||||
|
||||
@@ -105,11 +105,12 @@ class Dynamips(BaseManager):
|
||||
|
||||
_VM_CLASS = DynamipsVM
|
||||
_DEVICE_CLASS = DynamipsDevice
|
||||
_ghost_ios_lock = asyncio.Lock()
|
||||
_ghost_ios_lock = None
|
||||
|
||||
def __init__(self):
|
||||
|
||||
super().__init__()
|
||||
Dynamips._ghost_ios_lock = asyncio.Lock()
|
||||
self._devices = {}
|
||||
self._ghost_files = set()
|
||||
self._dynamips_path = None
|
||||
|
||||
Reference in new issue
Block a user