X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fmemcached_dump.c;h=5872aa40de4b9f953d1ff7492553fa8c4e1605d4;hb=498004747168d79b55b2bc2b61033cea3f72bc88;hp=393e140a557e50602876038b05b7500b25193d6f;hpb=49e9e4b85ebfe5f5cbe6f8aea4b6f3a2417a465b;p=m6w6%2Flibmemcached diff --git a/libmemcached/memcached_dump.c b/libmemcached/memcached_dump.c index 393e140a..5872aa40 100644 --- a/libmemcached/memcached_dump.c +++ b/libmemcached/memcached_dump.c @@ -55,6 +55,18 @@ static memcached_return ascii_dump(memcached_st *ptr, memcached_dump_func *callb } else if (rc == MEMCACHED_END) break; + else if (rc == MEMCACHED_SERVER_ERROR || rc == MEMCACHED_CLIENT_ERROR) + { + /* If we try to request stats cachedump for a slab class that is too big + * the server will return an incorrect error message: + * "MEMCACHED_SERVER_ERROR failed to allocate memory" + * This isn't really a fatal error, so let's just skip it. I want to + * fix the return value from the memcached server to a CLIENT_ERROR, + * so let's add support for that as well right now. + */ + rc= MEMCACHED_END; + break; + } else goto error; }