Jdesk / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

possible accept_new_conns() bug #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just from eyeballing the code, I think the accept_new_conns() function (new
connection throttling) might not work.

accept_new_conns(false) is called by the listen thread when there aren't
enough file descriptors.  Later, in conn_close(), the code calls
accept_new_conns(true) since closing a connection releases a file descriptor.

But, there's a sanity check in accept_new_conns(), line 3079...

    if (! is_listen_thread())
        return;

I haven't written a test or proven it live, but I think that
accept_new_conns(true) never really works because of that check.  Meaning
once memcached stops accepting new connections, it never starts accepting
new connections anymore.

Original issue reported on code.google.com by steve....@gmail.com on 10 Apr 2009 at 8:45

GoogleCodeExporter commented 9 years ago
This is fixed in 1.2.8 and dev

Original comment by dsalli...@gmail.com on 14 Apr 2009 at 7:20