From bdf91361b4b62a893dcc70ace2bdca0c0b3cf90d Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 27 Sep 2018 21:22:10 -0700 Subject: [PATCH] Keep trying ports until it finds a free one --- onionshare/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare/common.py b/onionshare/common.py index 0ce411e8..28b282c2 100644 --- a/onionshare/common.py +++ b/onionshare/common.py @@ -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