revert most of d7a0084bf99d618d1dc26a54fd413db7ae8b8e63
authorMichael Wallner <mike@php.net>
Wed, 1 Mar 2023 16:14:48 +0000 (17:14 +0100)
committerMichael Wallner <mike@php.net>
Wed, 1 Mar 2023 16:14:48 +0000 (17:14 +0100)
See php-memcached-dev/php-memcached#531

src/libmemcached/purge.cc
src/libmemcached/response.cc
test/tests/memcached/noblock.cpp

index a8da0f3800f5002d3147a91b5e9277878ed5fa73..ff0321052ab6117b63d7ff7b15173ca6a0ee5d6e 100644 (file)
@@ -108,9 +108,6 @@ bool memcached_purge(memcached_instance_st *ptr) {
         WATCHPOINT_ERROR(rc);
         is_successful = false;
       }
-      if (rc == MEMCACHED_TIMEOUT) {
-        break;
-      }
 
       if (ptr->root->callbacks) {
         memcached_callback_st cb = *ptr->root->callbacks;
index 7e4610b57dbb9abdb00507a55e307f3166cb8e11..d39451332633946641585a0311d132d39891657b 100644 (file)
@@ -761,7 +761,7 @@ static memcached_return_t _read_one_response(memcached_instance_st *instance, ch
     rc = textual_read_one_response(instance, buffer, buffer_length, result);
   }
 
-  if (memcached_fatal(rc) && rc != MEMCACHED_TIMEOUT) {
+  if (memcached_fatal(rc)) {
     memcached_io_reset(instance);
   }
 
index f2de04add9267adcf1516b0452389dff7b55a8dc..307c4e3a2d8c54b6134159a8a3c2e5aa6dde1e04 100644 (file)
@@ -23,9 +23,6 @@ TEST_CASE("memcached_noblock") {
       break;
     case MEMCACHED_TIMEOUT:
     case MEMCACHED_WRITE_FAILURE:
-      if(!timeout) {
-        --i;
-      }
       ++hit;
       REQUIRE(true);
       break;