Commit ffbfe295 authored by Nicolas Delaby's avatar Nicolas Delaby

If connexion is closed, even get_stats may failed

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28903 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ef8f47e7
...@@ -79,7 +79,10 @@ class DistributedRamCache(BaseCache): ...@@ -79,7 +79,10 @@ class DistributedRamCache(BaseCache):
memcache_conn = connection_pool.get(thread_id, None) memcache_conn = connection_pool.get(thread_id, None)
if memcache_conn is not 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]): if not len(stats) or not len(stats[0][1]):
# create a new connection if the existing connection seems # create a new connection if the existing connection seems
# dead. # dead.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment