mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-13 04:48:22 +00:00
Use SO_REUSEADDR before calling bind() where missing. Fixes #1289.
This commit is contained in:
@ -894,6 +894,7 @@ class QemuVM(BaseNode):
|
||||
af, socktype, proto, _, sa = res
|
||||
# let the OS find an unused port for the Qemu monitor
|
||||
with socket.socket(af, socktype, proto) as sock:
|
||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
sock.bind(sa)
|
||||
self._monitor = sock.getsockname()[1]
|
||||
except OSError as e:
|
||||
|
Reference in New Issue
Block a user