fds[0].events = POLLOUT;
int timeout= ptr->root->connect_timeout;
- if (ptr->root->flags.no_block == false)
+ if (ptr->root->flags.no_block == true)
timeout= -1;
size_t loop_max= 5;
loop_max= 1;
break;
case 0:
+ if (loop_max==1)
+ return MEMCACHED_TIMEOUT;
continue;
// A real error occurred and we need to completely bail
default:
}
#ifdef LIBMEMCACHED_WITH_SASL_SUPPORT
- if (ptr->fd != -1 && ptr->root->sasl.callbacks != NULL)
+ if (ptr->fd != -1 && ptr->root->sasl && ptr->root->sasl->callbacks)
{
memcached_return rc= memcached_sasl_authenticate_connection(ptr);
if (rc != MEMCACHED_SUCCESS)