From 5a762b16ade9b7929518bfc8235a0de894b232b5 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Mon, 19 Feb 2018 12:28:17 -0800 Subject: [PATCH] call increase_rlimits() when creating the service --- src/wormhole_transit_relay/server_tap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wormhole_transit_relay/server_tap.py b/src/wormhole_transit_relay/server_tap.py index 0f7ca50..718759e 100644 --- a/src/wormhole_transit_relay/server_tap.py +++ b/src/wormhole_transit_relay/server_tap.py @@ -1,11 +1,12 @@ import os -from . import transit_server from twisted.internet import reactor from twisted.python import usage from twisted.application.service import MultiService from twisted.application.internet import (TimerService, StreamServerEndpointService) from twisted.internet import endpoints +from . import transit_server +from .increase_rlimits import increase_rlimits LONGDESC = """\ This plugin sets up a 'Transit Relay' server for magic-wormhole. This service @@ -29,6 +30,7 @@ class Options(usage.Options): def makeService(config, reactor=reactor): + increase_rlimits() ep = endpoints.serverFromString(reactor, config["port"]) # to listen log_file = (os.fdopen(int(config["log-fd"]), "w") if config["log-fd"] is not None