Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
umemcached uses disconnect()
Browse files Browse the repository at this point in the history
  • Loading branch information
tarekziade committed Aug 21, 2012
1 parent 271699b commit d4bf33b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions memcachepool/cache.py
Expand Up @@ -69,6 +69,9 @@ def delete(self, key, version=None):
conn.delete(key)

def get_many(self, keys, version=None):
if keys == {}:
return {}

new_keys = map(lambda x: self.make_key(x, version=version), keys)
with self._pool.reserve() as conn:
ret = conn.get_multi(new_keys)
Expand Down
2 changes: 1 addition & 1 deletion memcachepool/pool.py
Expand Up @@ -52,7 +52,7 @@ def _checkout_connection(self):
return ts, client
# Otherwise, the connection is stale.
# Close it, push an empty slot onto the queue, and retry.
client.disconnect_all()
client.disconnect()
self.clients.put(EMPTY_SLOT)
continue

Expand Down

0 comments on commit d4bf33b

Please sign in to comment.