Merge in dist fix from Monty
[m6w6/libmemcached] / libmemcached / connect.c
index 75d174b459e3418839a251a9dd2fa14483088d19..3afef7d32c99723cecb30fd76c864d43ad89df2e 100644 (file)
@@ -19,16 +19,12 @@ static memcached_return_t connect_poll(memcached_server_st *ptr)
   fds[0].fd = ptr->fd;
   fds[0].events = POLLOUT;
 
-  int timeout= ptr->root->connect_timeout;
-  if (ptr->root->flags.no_block == true)
-    timeout= -1;
-
   int error;
   size_t loop_max= 5;
 
   while (--loop_max) // Should only loop on cases of ERESTART or EINTR
   {
-    error= poll(fds, 1, timeout);
+    error= poll(fds, 1, ptr->root->connect_timeout);
 
     switch (error)
     {