[Twisted-Python] connectionLost never reached after calling loseConnection: stuck in CLOSE_WAIT forever

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Sun Oct 17 17:41:44 EDT 2010


On 05:00 pm, ste at demaledetti.net wrote:
>Hello Glyph, thanks for your reply and suggestions.
>
>I don't have a self-contained sample yet but at least I managed to
>reproduce it reliably on my installation and after a few more
>experiments I think I am narrowing this down, please read below.
>
>What did make a difference was to comment this line, the problem
>never happens without it:
>
>to.transport.registerProducer(_from.transport, True)

This suggests that your problem is that you don't unregister the 
produce.  The connection can never be closed as long as a producer is 
registered.  Does your code ever unregister this producer?

Jean-Paul



More information about the Twisted-Python mailing list