Browse files

added socket errors

  • Loading branch information...
1 parent 8a589f3 commit d1c05b0b2305c7dcfb116153b4c240982a2fa628 @tarekziade tarekziade committed Dec 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 memcachepool/client.py
View
3 memcachepool/client.py
@@ -11,6 +11,7 @@
'add', 'replace', 'append', 'prepend', 'delete',
'cas', 'incr', 'decr', 'stats', 'flush_all',
'version')
+_ERRORS = (IOError, RuntimeError, MemcachedError, socket.error)
class Client(object):
@@ -75,7 +76,7 @@ def __with_retry(*args, **kw):
while retries < self.max_connect_retries:
try:
return current_func(*args, **kw)
- except (IOError, RuntimeError, MemcachedError), exc:
+ except _ERRORS, exc:
self._create_client()
current_func = getattr(self._client, func.__name__)
time.sleep(delay)

0 comments on commit d1c05b0

Please sign in to comment.