Support comma separated endpoint list in tub.port

fixes ticket #867
This commit is contained in:
David Stainton 2016-09-15 13:22:54 +00:00 committed by Brian Warner
parent b537f470c9
commit e6d7895865
1 changed files with 4 additions and 3 deletions

View File

@ -438,9 +438,10 @@ class Node(service.MultiService):
portlocation = self.get_tub_portlocation(cfg_tubport, cfg_location) portlocation = self.get_tub_portlocation(cfg_tubport, cfg_location)
if portlocation: if portlocation:
tubport, location = portlocation tubport, location = portlocation
if tubport in ("0", "tcp:0"): for port in tubport.split(","):
if port in ("0", "tcp:0"):
raise ValueError("tub.port cannot be 0: you must choose") raise ValueError("tub.port cannot be 0: you must choose")
self.tub.listenOn(tubport) self.tub.listenOn(port)
self.tub.setLocation(location) self.tub.setLocation(location)
self._tub_is_listening = True self._tub_is_listening = True
self.log("Tub location set to %s" % (location,)) self.log("Tub location set to %s" % (location,))