Ticket #729 (closed enhancement: fixed)
use TCP keepalives (optionally) for slaves and IRC
| Reported by: | dustin | Owned by: | dustin |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.2 |
| Version: | master | Keywords: | |
| Cc: |
Description
12:32 < exarkun> djmitche: broker.transport.setTcpKeepalive(True) should work. Or, more cleanly, a twisted.protocols.policies.WrappingFactory? that does something similar (but it wouldn't have to go through the broker, which is kind of nice).
Change History
comment:3 Changed 3 years ago by dustin
- Status changed from new to closed
- Resolution set to fixed
We do this already, although probably not the optimal way:
339 def gotPerspective(self, perspective):
340 ReconnectingPBClientFactory.gotPerspective(self, perspective)
341 self.perspective = perspective
342 try:
343 perspective.broker.transport.setTcpKeepAlive(1)
344 except:
345 log.msg("unable to set SO_KEEPALIVE")
346 if not self.keepaliveInterval:
347 self.keepaliveInterval = 10*60
A patch for a more Twisted-compliant way to do this would be appreciated - I've never heard of protocol policies, and I don't know how I'd go about applying one. Reopen the bug for such a purpose.
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)