summaryrefslogtreecommitdiff
path: root/memcache
diff options
context:
space:
mode:
authorpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2005-11-30 17:14:45 +0000
committerpquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68>2005-11-30 17:14:45 +0000
commitdc7a58f04eaaa40219b38a167ac62b2d45cd9966 (patch)
treea466f014723bdb0d1a6f31a1b70b73258504d655 /memcache
parent87d517fd9208753627f09aaa5839b0f6081ae60e (diff)
downloadlibapr-util-dc7a58f04eaaa40219b38a167ac62b2d45cd9966.tar.gz
Set the connection timeout, before we try to connect, otherwise we use the default timeout, which is too long for memcached.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@349992 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memcache')
-rw-r--r--memcache/apr_memcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/memcache/apr_memcache.c b/memcache/apr_memcache.c
index 327de37e..ec7bcddd 100644
--- a/memcache/apr_memcache.c
+++ b/memcache/apr_memcache.c
@@ -251,12 +251,12 @@ static apr_status_t conn_connect(apr_memcache_conn_t *conn)
return rv;
}
- rv = apr_socket_connect(conn->sock, sa);
+ rv = apr_socket_timeout_set(conn->sock, 1 * APR_USEC_PER_SEC);
if (rv != APR_SUCCESS) {
return rv;
}
- rv = apr_socket_timeout_set(conn->sock, 1 * APR_USEC_PER_SEC);
+ rv = apr_socket_connect(conn->sock, sa);
if (rv != APR_SUCCESS) {
return rv;
}