{
goto handle_retry;
}
- else if (error != 1 || fds[0].revents & POLLERR)
+ else if (error != 1 && fds[0].revents & POLLERR)
{
ptr->cached_errno= errno;
WATCHPOINT_ERRNO(ptr->cached_errno);
WATCHPOINT_NUMBER(ptr->root->connect_timeout);
- close(ptr->fd);
- ptr->fd= -1;
- if (ptr->address_info)
- {
- freeaddrinfo(ptr->address_info);
- ptr->address_info= NULL;
- }
+ memcached_quit_server(ptr, 1);
if (ptr->root->retry_timeout)
{
ptr->next_retry= next_time.tv_sec + ptr->root->retry_timeout;
}
ptr->server_failure_counter+= 1;
+
return MEMCACHED_ERRNO;
}
sprintf(key, "%d", x);
rc = memcached_set(memc, key, strlen(key),
randomstuff, strlen(randomstuff), 10, 0);
+ WATCHPOINT_ERROR(rc);
+ assert(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
/* If we fail, lets try again */
if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_BUFFERED)
rc = memcached_set(memc, key, strlen(key),
randomstuff, strlen(randomstuff), 10, 0);
+ WATCHPOINT_ERROR(rc);
assert(rc == MEMCACHED_SUCCESS || rc == MEMCACHED_BUFFERED);
}