1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-26 00:38:10 +00:00

When checking for a free port check if the host and 0.0.0.0 are available

Because some emulators will listen on 0.0.0.0 and not on the host.

Fix #721
This commit is contained in:
Julien Duponchelle 2016-10-18 09:57:32 +02:00
parent e63da227d0
commit b53b34d485
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -153,6 +153,8 @@ class PortManager:
try: try:
PortManager._check_port(host, port, socket_type) PortManager._check_port(host, port, socket_type)
if host != "0.0.0.0":
PortManager._check_port("0.0.0.0", port, socket_type)
return port return port
except OSError as e: except OSError as e:
last_exception = e last_exception = e