From e30f1f11fdb913d43fbc85d6bc5bc802637a81a1 Mon Sep 17 00:00:00 2001 From: pquerna Date: Sat, 2 Dec 2006 07:12:56 +0000 Subject: 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. git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@481513 13f79535-47bb-0310-9956-ffa450edef68 --- memcache/apr_memcache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'memcache') diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c index 8e6dc056..0539917f 100644 --- a/memcache/apr_memcache.c +++ b/memcache/apr_memcache.c @@ -277,6 +277,11 @@ static apr_status_t conn_connect(apr_memcache_conn_t *conn) return rv; } + rv = apr_socket_timeout_set(conn->sock, -1); + if (rv != APR_SUCCESS) { + return rv; + } + return rv; } -- cgit v1.2.1