[Twisted-Python] ConnectionMixin.loseConnection (in _newtls) lacking arguments

Saúl Ibarra Corretgé saghul at gmail.com
Wed Jan 4 06:14:57 EST 2012

Hi Glyph,

> Hi Saúl,
> The _connDone argument there is an internal convenience for that implementation of loseConnection(); it is not part of the API.  ITransport specifies that loseConnection takes no arguments.  See here: <http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.ITransport.html#loseConnection>.  You should fix your code to never pass an argument to loseConnection, as other transport implementations may also lack this argument.  (As a bizarre accident, the IOCP reactor also has this argument in its transport implementation, but there's no reason that it necessarily should.)
> However, the fact that you thought otherwise is a bug in our documentation :).  Please feel free to file tickets (<http://twistedmatrix.com/trac/newticket>) describing how you got to the loseConnection that takes an argument and why you didn't realize that you should be looking at ITransport instead :).

I see. I'll fix the bug and file a ticket then :-)


http://saghul.net | http://sipdoc.net

More information about the Twisted-Python mailing list