enable SO_KEEPALIVE on all connections

This timeout is notoriously long (about two hours), but it might eventually
prune stuck connections.

refs #9
This commit is contained in:
Brian Warner 2019-09-10 23:14:29 -07:00
parent 273c4d796c
commit 42a293213b

View File

@ -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: