From: Brian Aker Date: Tue, 11 Dec 2007 19:52:24 +0000 (-0800) Subject: Suggested change from Antony X-Git-Tag: 0.13~36 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=61006df5c199906f2d4f644bc2776d774756899a;p=m6w6%2Flibmemcached Suggested change from Antony --- diff --git a/include/memcached.h b/include/memcached.h index b8d0803b..502b07b5 100644 --- a/include/memcached.h +++ b/include/memcached.h @@ -35,7 +35,7 @@ typedef struct memcached_server_st memcached_server_st; #define MEMCACHED_MAX_HOST_LENGTH 64 #define MEMCACHED_WHEEL_SIZE 1024 #define MEMCACHED_STRIDE 4 -#define MEMCACHED_DEFAULT_TIMEOUT 65556 +#define MEMCACHED_DEFAULT_TIMEOUT INT16_MAX typedef enum { MEMCACHED_SUCCESS, diff --git a/lib/memcached_connect.c b/lib/memcached_connect.c index e00a6301..f5acadfa 100644 --- a/lib/memcached_connect.c +++ b/lib/memcached_connect.c @@ -142,7 +142,7 @@ static memcached_return tcp_connect(memcached_st *ptr, unsigned int server_key) struct linger linger; linger.l_onoff= 1; - linger.l_linger= 65536; + linger.l_linger= MEMCACHED_DEFAULT_TIMEOUT; error= setsockopt(ptr->hosts[server_key].fd, SOL_SOCKET, SO_LINGER, &linger, (socklen_t)sizeof(struct linger)); WATCHPOINT_ASSERT(error == 0);