Fix connect with timeouts
[awesomized/libmemcached] / libmemcached / memcached_version.c
index 0a77529c7d1ed5ab1926c903a774fe0082728791..5b2386f299655f2a8840f5beca98d705539f69d3 100644 (file)
@@ -41,7 +41,10 @@ static inline memcached_return memcached_version_textual(memcached_st *ptr)
 
     rrc= memcached_response(&ptr->hosts[x], buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL);
     if (rrc != MEMCACHED_SUCCESS)
+    {
       rc= MEMCACHED_SOME_ERRORS;
+      continue;
+    }
 
     /* Find the space, and then move one past it to copy version */
     response_ptr= index(buffer, ' ');
@@ -94,6 +97,7 @@ static inline memcached_return memcached_version_binary(memcached_st *ptr)
       {
         memcached_io_reset(&ptr->hosts[x]);
         rc= MEMCACHED_SOME_ERRORS;
+        continue;
       }
 
       ptr->hosts[x].major_version= (uint8_t)strtol(buffer, &p, 10);