Skip to content

Commit

Permalink
enable SO_KEEPALIVE on all connections
Browse files Browse the repository at this point in the history
This timeout is notoriously long (about two hours), but it might eventually
prune stuck connections.

refs #9
  • Loading branch information
warner committed Sep 11, 2019
1 parent 273c4d7 commit 42a2932
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wormhole_transit_relay/transit_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def describeToken(self):
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:
Expand Down

0 comments on commit 42a2932

Please sign in to comment.