diff --git a/src/wormhole_transit_relay/server_tap.py b/src/wormhole_transit_relay/server_tap.py index a54082b..8198674 100644 --- a/src/wormhole_transit_relay/server_tap.py +++ b/src/wormhole_transit_relay/server_tap.py @@ -70,9 +70,9 @@ def makeService(config, reactor=reactor): print("Using WebSocket URL '{}'".format(ws_url)) ws_factory = WebSocketServerFactory(ws_url) ws_factory.protocol = transit_server.WebSocketTransitConnection + ws_factory.transit = transit tcp_factory.transit = transit - ws_factory.transit = transit parent = MultiService() StreamServerEndpointService(tcp_ep, tcp_factory).setServiceParent(parent) if ws_ep is not None: diff --git a/src/wormhole_transit_relay/test/test_config.py b/src/wormhole_transit_relay/test/test_config.py index 72aa7ec..0b014d2 100644 --- a/src/wormhole_transit_relay/test/test_config.py +++ b/src/wormhole_transit_relay/test/test_config.py @@ -9,12 +9,14 @@ class Config(unittest.TestCase): o = server_tap.Options() o.parseOptions([]) self.assertEqual(o, {"blur-usage": None, "log-fd": None, - "usage-db": None, "port": PORT}) + "usage-db": None, "port": PORT, + "websocket": None, "websocket-url": None}) def test_blur(self): o = server_tap.Options() o.parseOptions(["--blur-usage=60"]) self.assertEqual(o, {"blur-usage": 60, "log-fd": None, - "usage-db": None, "port": PORT}) + "usage-db": None, "port": PORT, + "websocket": None, "websocket-url": None}) def test_string(self): o = server_tap.Options()