apr-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?view=rev&rev=481513
Log:
Reset the socket to blocking mode after connect() finishes.

This fixes some issues with both larger writes, and larger
multi-gets, where the connection would timeout, even though
everything is working fine.

A better solution would be to write a socket_writev_full(),
to ensure the usage of timeouts effectively, but the
reality of memcached is that if you can connect, your
request will always be serviced, unless the memcached
instance went away at exactly that moment.

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=481513&r1=481512&r2=481513
==============================================================================
--- apr/apr-util/trunk/memcache/apr_memcache.c (original)
+++ apr/apr-util/trunk/memcache/apr_memcache.c Fri Dec  1 23:12:56 2006
@@ -277,6 +277,11 @@
         return rv;
     }
 
+    rv = apr_socket_timeout_set(conn->sock, -1);
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
+
     return rv;
 }
 



Mime
View raw message