From 894da4424403d0f0a579abadb8b22147dfd877e5 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sun, 21 Jun 2015 21:08:21 -0700 Subject: [PATCH] relay: make it possible to omit the Transit server --- src/wormhole/servers/relay.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wormhole/servers/relay.py b/src/wormhole/servers/relay.py index 68dbb3e..3a6fd7c 100644 --- a/src/wormhole/servers/relay.py +++ b/src/wormhole/servers/relay.py @@ -406,7 +406,8 @@ class RelayServer(service.MultiService): t = internet.TimerService(EXPIRATION_CHECK_PERIOD, self.relay.prune_old_channels) t.setServiceParent(self) - self.transit = Transit() - self.transit.setServiceParent(self) # for the timer - self.transport_service = strports.service(transitport, self.transit) - self.transport_service.setServiceParent(self) + if transitport: + self.transit = Transit() + self.transit.setServiceParent(self) # for the timer + self.transport_service = strports.service(transitport, self.transit) + self.transport_service.setServiceParent(self)