On success, we should exit the loop.
authorBrian Aker <brian@tangent.org>
Mon, 3 Oct 2011 19:01:10 +0000 (12:01 -0700)
committerBrian Aker <brian@tangent.org>
Mon, 3 Oct 2011 19:01:10 +0000 (12:01 -0700)
tests/mem_functions.cc

index d0a59fdc790d352efe3c2ca1a8ef768c9f7f2d21..18e092e42c3f396dd8dc3efd4487c8d9ac611505 100644 (file)
@@ -4374,6 +4374,11 @@ static test_return_t connection_pool3_test(memcached_st *memc)
     struct timespec relative_time= { 0, 0 };
     pop_memc= memcached_pool_fetch(pool, &relative_time, &rc);
 
+    if (memcached_success(rc))
+    {
+      break;
+    }
+
     if (memcached_failed(rc))
     {
       test_null(pop_memc);