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

Glyph Lefkowitz glyph at twistedmatrix.com
Sun Oct 31 15:57:31 EDT 2010

On Oct 31, 2010, at 1:36 PM, Stefano Debenedetti wrote:

> Il 30/10/2010 18:48, Stefano Debenedetti ha scritto:
>> http://twistedmatrix.com/trac/ticket/4719
> I have attached a 2 lines patch that seems to fix the issue.
> The patch also contains a 50 lines unit test ;)

Stefano, this looks like a great contribution: a serious bug fix in a bit of core functionality, with a test.  Thanks so much!

I'll try to do a complete review soon, but my immediate impression is that test_disconnectEvent needs a better docstring.  The word 'correctly' in a docstring is always a clue that the writer gave up and stopped trying to describe what 'correct' behavior is :).

if you could try to rephrase it as "When a transport is (...) and then (...), (...) should be called on (...)".

(I will have a more concrete suggestion, with fewer "..."s when I have time to go through the ticket history and review the patch in detail.)

> I hope this makes it on time for the 10.2.0 release.
> BTW there's a small error here:
> http://twistedmatrix.com/trac/wiki/BasicGuideToContributingCode
> $ svn diff -u
> Subcommand 'diff' doesn't accept option '-u [--show-updates]'
> Type 'svn help diff' for usage.
> So the correct command for generating a patch should be documented as:
> svn diff > my-twisted-patch.patch
> thanks ciao
> ste
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20101031/c4c3b729/attachment.htm 

More information about the Twisted-Python mailing list