apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r481516 - /apr/apr-util/trunk/memcache/apr_memcache.c
Date Sat, 02 Dec 2006 07:29:50 GMT
Author: pquerna
Date: Fri Dec  1 23:29:48 2006
New Revision: 481516

URL: http://svn.apache.org/viewvc?view=rev&rev=481516
Log:
Remove the active server from the pollset before returning it's socket to the resource list,
preventing any race conditions.

Modified:
    apr/apr-util/trunk/memcache/apr_memcache.c

Modified: apr/apr-util/trunk/memcache/apr_memcache.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/memcache/apr_memcache.c?view=diff&rev=481516&r1=481515&r2=481516
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Fri Dec  1 23:29:48 2006
@@ -1337,10 +1337,10 @@
            }
            else if (strncmp(MS_END, conn->buffer, MS_END_LEN) == 0) {
                /* this connection is done */
+               apr_pollset_remove (pollset, &activefds[i]);
                ms_release_conn(ms, conn);
                apr_hash_set(server_queries, &ms, sizeof(ms), NULL);
                
-               apr_pollset_remove (pollset, &activefds[i]);
                queries_sent--;
            }
            else {



Mime
View raw message