[Twisted-Python] Re: How can I disconnect ssl connection from the client side?

Jean-Paul Calderone exarkun at divmod.com
Mon Feb 2 06:18:42 MST 2009


On Mon, 2 Feb 2009 19:48:50 +0900, Atsuo Ishimoto <ishimoto at gembook.org> wrote:
>Investigating further, I found this is not SSL related problem, but in
>my code may have bug. In the following script, I expect that reactor
>stops in 2 secs after it started, but connectionLost() is not fired at
>all.
>
>Is this a bug in Twisted? Or Am I missing something?
>

This does look like a bug in Twisted.  Could you file a ticket for it?

In the mean time, you can work around this by using a simpler cancel
technique.  Get rid of the "conn.disconnect()" call in cancel and
instead call the protocol's transport's loseConnection method in f1
and f2 if CANCEL is set.

Jean-Paul




More information about the Twisted-Python mailing list