From 48dcc61a4919f6f3d5ee164630a843f2d8b8ade9 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 1 Mar 2023 17:14:48 +0100 Subject: [PATCH] revert most of d7a0084bf99d618d1dc26a54fd413db7ae8b8e63 See php-memcached-dev/php-memcached#531 --- src/libmemcached/purge.cc | 3 --- src/libmemcached/response.cc | 2 +- test/tests/memcached/noblock.cpp | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/libmemcached/purge.cc b/src/libmemcached/purge.cc index a8da0f38..ff032105 100644 --- a/src/libmemcached/purge.cc +++ b/src/libmemcached/purge.cc @@ -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; diff --git a/src/libmemcached/response.cc b/src/libmemcached/response.cc index 7e4610b5..d3945133 100644 --- a/src/libmemcached/response.cc +++ b/src/libmemcached/response.cc @@ -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); } diff --git a/test/tests/memcached/noblock.cpp b/test/tests/memcached/noblock.cpp index f2de04ad..307c4e3a 100644 --- a/test/tests/memcached/noblock.cpp +++ b/test/tests/memcached/noblock.cpp @@ -23,9 +23,6 @@ TEST_CASE("memcached_noblock") { break; case MEMCACHED_TIMEOUT: case MEMCACHED_WRITE_FAILURE: - if(!timeout) { - --i; - } ++hit; REQUIRE(true); break; -- 2.30.2