From d234ba4d3903a1284c02d45d86ef816fd696c13a Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 21 Jan 2020 12:40:15 +0100 Subject: [PATCH] libmemcached: recognize more server out of memory conditions --- libmemcached/response.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmemcached/response.cc b/libmemcached/response.cc index ad3c0785..79ab7e65 100644 --- a/libmemcached/response.cc +++ b/libmemcached/response.cc @@ -309,8 +309,9 @@ static memcached_return_t textual_read_one_response(memcached_instance_st* insta return MEMCACHED_E2BIG; } - if (total_read >= memcached_literal_param_size("SERVER_ERROR out of memory storing object") and - (memcmp(buffer, memcached_literal_param("SERVER_ERROR out of memory storing object")) == 0)) + if (total_read >= memcached_literal_param_size("SERVER_ERROR out of memory") and + ((memcmp(buffer, memcached_literal_param("SERVER_ERROR out of memory")) == 0) or + (memcmp(buffer, memcached_literal_param("SERVER_ERROR Out of memory")) == 0))) { return MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE; } -- 2.30.2