
Feb. 2, 2009
2:50 p.m.
This does look like a bug in Twisted. Could you file a ticket for it?
Done. #3644.
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.
Thank you for your comment, Jean-Paul , Johann. Now my application working right!