mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-27 00:09:50 -05:00
Keep trying ports until it finds a free one
This commit is contained in:
parent
6f57f7eae6
commit
75153db11e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user