diff --git a/product/ERP5Type/CachePlugins/DistributedRamCache.py b/product/ERP5Type/CachePlugins/DistributedRamCache.py index d2a53693ae1258f69599032e9ab8f047b327207c..3ff2be69197b8f4c5e0e537884d79f0ead95c655 100644 --- a/product/ERP5Type/CachePlugins/DistributedRamCache.py +++ b/product/ERP5Type/CachePlugins/DistributedRamCache.py @@ -79,7 +79,10 @@ class DistributedRamCache(BaseCache): memcache_conn = connection_pool.get(thread_id, None) if memcache_conn is not None: - stats = memcache_conn.get_stats() + try: + stats = memcache_conn.get_stats() + except IndexError: + stats = () if not len(stats) or not len(stats[0][1]): # create a new connection if the existing connection seems # dead.