mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 03:06:33 +00:00
Use listenOnUnused instead of allocate_tcp_port in create_log_tub
This commit is contained in:
parent
6ea1684995
commit
edba0747a3
@ -763,12 +763,8 @@ class Node(service.MultiService):
|
||||
# to use "flogtool tail" against a remote server), but for now I
|
||||
# think we can live without it.
|
||||
self.log_tub = Tub()
|
||||
portnum = iputil.allocate_tcp_port()
|
||||
port = "tcp:%d:interface=127.0.0.1" % portnum
|
||||
location = "tcp:127.0.0.1:%d" % portnum
|
||||
self.log_tub.listenOn(port)
|
||||
self.log_tub.setLocation(location)
|
||||
self.log("Log Tub location set to %s" % (location,))
|
||||
portnum = iputil.listenOnUnused(self.log_tub)
|
||||
self.log("Log Tub location set to 127.0.0.1:%s" % (portnum,))
|
||||
self.log_tub.setServiceParent(self)
|
||||
|
||||
def startService(self):
|
||||
|
Loading…
Reference in New Issue
Block a user