diff options
author | Zach Copley <zach@status.net> | 2010-01-13 19:17:49 +0000 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-01-13 19:17:49 +0000 |
commit | c3188fd1fece2be7f7c4211d28f4a3d3a59c8fa1 (patch) | |
tree | aa8018e132936b00fc63224e75ca134d68999b4e /plugins/MemcachePlugin.php | |
parent | 43170b3d18153b3dfd8675bd77ae1133eed8148a (diff) | |
parent | 0e1f2d4b47e5e340679c4245b62e1d64c6b9c9b9 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'plugins/MemcachePlugin.php')
-rw-r--r-- | plugins/MemcachePlugin.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/MemcachePlugin.php b/plugins/MemcachePlugin.php index 5f93e9a83..fbc2802f7 100644 --- a/plugins/MemcachePlugin.php +++ b/plugins/MemcachePlugin.php @@ -133,6 +133,23 @@ class MemcachePlugin extends Plugin return false; } + function onStartCacheReconnect(&$success) + { + if (empty($this->_conn)) { + // nothing to do + return true; + } + if ($this->persistent) { + common_log(LOG_ERR, "Cannot close persistent memcached connection"); + $success = false; + } else { + common_log(LOG_INFO, "Closing memcached connection"); + $success = $this->_conn->close(); + $this->_conn = null; + } + return false; + } + /** * Ensure that a connection exists * |