[Twisted-Python] Re: socket is not closed when connection failed

Tsai Li Ming mailinglist at ltsai.com
Thu Feb 17 19:59:52 EST 2005

Jp Calderone wrote:
> On Thu, 17 Feb 2005 10:40:56 -0500, Itamar Shtull-Trauring <itamar at itamarst.org> wrote:
>>On Thu, 2005-02-17 at 21:00 +0800, Tsai Li Ming wrote:
>>>How serious is this bug? I'm particularly concern about twisted.web.server.
>>1. Servers don't open connections, so it's not relevant there.
>>2. It probably does not cause fd leaks, since python's gc will likely do
>>that. close()ing explicitly is better, obviously.
>   As a rough figure, with a max file descriptors limit of 1024, on Python 2.3.5,
> this tends not to be a problem with connection rates below 100 failed 
> connections per second.  The file descriptors are eventually closed by the 
> Python GC, it just takes a little while since the sockets are part of cyclic
> garbage.
>   Jp

I see what you mean. Upon looking fuerther at the tcp.py, the code 
section is for tcp clients, not "TCP Server Port".


More information about the Twisted-Python mailing list