mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-12 00:50:56 +00:00
This may fix "The semaphore timeout period has expired" error on Windows. #311.
This commit is contained in:
parent
65fa4036c6
commit
a9ac0d3380
@ -81,8 +81,8 @@ class DynamipsHypervisor:
|
||||
while time.time() - begin < timeout:
|
||||
yield from asyncio.sleep(0.01)
|
||||
try:
|
||||
self._reader, self._writer = yield from asyncio.open_connection(host, self._port)
|
||||
except OSError as e:
|
||||
self._reader, self._writer = yield from asyncio.wait_for(asyncio.open_connection(host, self._port), timeout=1)
|
||||
except (asyncio.TimeoutError, OSError) as e:
|
||||
last_exception = e
|
||||
continue
|
||||
connection_success = True
|
||||
|
@ -30,8 +30,6 @@ class NIO(object):
|
||||
|
||||
def __init__(self):
|
||||
|
||||
# create an unique name
|
||||
self._name = 'nio-{}'.format(uuid.uuid4())
|
||||
self._capturing = False
|
||||
self._pcap_output_file = ""
|
||||
self._pcap_data_link_type = ""
|
||||
@ -78,23 +76,3 @@ class NIO(object):
|
||||
"""
|
||||
|
||||
return self._pcap_data_link_type
|
||||
|
||||
|
||||
def __str__(self):
|
||||
"""
|
||||
NIO string representation.
|
||||
|
||||
:returns: NIO name
|
||||
"""
|
||||
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
Returns the NIO name.
|
||||
|
||||
:returns: NIO name
|
||||
"""
|
||||
|
||||
return self._name
|
||||
|
Loading…
Reference in New Issue
Block a user