From 42a293213b1dd03e862b24b62b7902d1f18de16c Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 10 Sep 2019 23:14:29 -0700 Subject: [PATCH] enable SO_KEEPALIVE on all connections This timeout is notoriously long (about two hours), but it might eventually prune stuck connections. refs #9 --- src/wormhole_transit_relay/transit_server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wormhole_transit_relay/transit_server.py b/src/wormhole_transit_relay/transit_server.py index fed1264..fd287fc 100644 --- a/src/wormhole_transit_relay/transit_server.py +++ b/src/wormhole_transit_relay/transit_server.py @@ -46,6 +46,7 @@ class TransitConnection(protocol.Protocol): def connectionMade(self): self._started = time.time() self._log_requests = self.factory._log_requests + self.transport.setTcpKeepAlive(True) def dataReceived(self, data): if self._sent_ok: