libmemcached: recognize more server out of memory conditions
authorMichael Wallner <mike@php.net>
Tue, 21 Jan 2020 11:40:15 +0000 (12:40 +0100)
committerMichael Wallner <mike@php.net>
Tue, 21 Jan 2020 11:40:15 +0000 (12:40 +0100)
libmemcached/response.cc

index ad3c0785dfa24bed1e1bc2b09b1488e08d2f85ee..79ab7e6599cef0c5e9b0ad5f6eb5a96154d93b19 100644 (file)
@@ -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;
         }