mirror of
https://github.com/onionshare/onionshare.git
synced 2025-09-22 21:44:51 -04:00
Keep trying ports until it finds a free one
This commit is contained in:
parent
6f57f7eae6
commit
75153db11e
1 changed files with 1 additions and 1 deletions
|
@ -433,7 +433,7 @@ class Common(object):
|
||||||
tmpsock.bind(("127.0.0.1", random.randint(min_port, max_port)))
|
tmpsock.bind(("127.0.0.1", random.randint(min_port, max_port)))
|
||||||
break
|
break
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise OSError(e)
|
pass
|
||||||
_, port = tmpsock.getsockname()
|
_, port = tmpsock.getsockname()
|
||||||
return port
|
return port
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue