twisted.conch.ssh.factory.SSHFactory.buildProtocol doesn't let you customize the protocol it creates
|Reported by:||mwh||Owned by:|
(github, patch, buildbot, log)
We want to set tcp keepalives on all connections to our ssh server, which would seem to be most logically done in connectionMade of the protocol object created on a connection -- but there's no way to influence the class of the protocol object created here, other than copy-paste-hacking buildProtocol into your factory subclass.
If SSHFactory.buildProtocol delegated to Factory.buildProtocol, you could do it by defining 'protocol' in your factory subclass, as in most of the rest of Twisted.
Diff attached, no tests though.
Change History (18)
comment:1 Changed 8 years ago by mwh
- Component changed from core to conch
- Owner changed from glyph to z3p
- Type changed from enhancement to defect