X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_connect.c;h=2b392fb6138528361abb5836f9e3d628fcface76;hb=1af835409ff66c8a2860d2d95aa72d7a7a817358;hp=de69e4465ef8c68e34d608f4bace32d4d0cd5042;hpb=99b3d2acf40a4e408b13e06e2e97db9c20b72908;p=m6w6%2Flibmemcached diff --git a/libmemcached/memcached_connect.c b/libmemcached/memcached_connect.c index de69e446..2b392fb6 100644 --- a/libmemcached/memcached_connect.c +++ b/libmemcached/memcached_connect.c @@ -1,4 +1,5 @@ #include "common.h" +#include #include #include @@ -13,7 +14,7 @@ static memcached_return set_hostinfo(memcached_server_st *server) memset(&hints, 0, sizeof(hints)); - hints.ai_family= AF_INET; + // hints.ai_family= AF_INET; if (server->type == MEMCACHED_CONNECTION_UDP) { hints.ai_protocol= IPPROTO_UDP; @@ -248,13 +249,13 @@ test_connect: ptr->address_info= NULL; } - if (ptr->root->retry_timeout) - { - struct timeval next_time; + if (ptr->root->retry_timeout) + { + struct timeval next_time; - gettimeofday(&next_time, NULL); - ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout; - } + gettimeofday(&next_time, NULL); + ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout; + } ptr->server_failure_counter+= 1; return MEMCACHED_ERRNO; }