From 3171a4bb561165d4ce76aff7df4aa867dadee30c Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 20 Feb 2015 00:00:27 -0800 Subject: [PATCH] transit: don't use hard-coded listening ports --- src/wormhole/blocking/transit.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wormhole/blocking/transit.py b/src/wormhole/blocking/transit.py index 7fc6fd8..c69c8c5 100644 --- a/src/wormhole/blocking/transit.py +++ b/src/wormhole/blocking/transit.py @@ -153,7 +153,7 @@ class Common: self._start_server() def _start_server(self): - server = MyTCPServer(("",self.server_port), None) + server = MyTCPServer(("", 0), None) _, port = server.server_address self.my_direct_hints = ["%s,%d" % (addr, port) for addr in ipaddrs.find_addresses()] @@ -245,9 +245,7 @@ class Common: skt.close() class TransitSender(Common): - server_port = 9999 is_sender = True class TransitReceiver(Common): - server_port = 9998 is_sender = False