Keep trying ports until it finds a free one

This commit is contained in:
Micah Lee 2018-09-27 21:22:10 -07:00
parent 6f57f7eae6
commit 75153db11e
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -433,7 +433,7 @@ class Common(object):
tmpsock.bind(("127.0.0.1", random.randint(min_port, max_port)))
break
except OSError as e:
raise OSError(e)
pass
_, port = tmpsock.getsockname()
return port