From ee574b9c6aff00929b46e87dba6ddde2166a409f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 5 Nov 2013 14:18:07 -0800 Subject: [PATCH] Added some sanity close() calls to RedisConnectionPool Change-Id: Icd0e249a1524f880c99986c9bea3b891ab9b9ba6 --- includes/clientpool/RedisConnectionPool.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/clientpool/RedisConnectionPool.php b/includes/clientpool/RedisConnectionPool.php index f4a2fa6cb7..537deacca4 100644 --- a/includes/clientpool/RedisConnectionPool.php +++ b/includes/clientpool/RedisConnectionPool.php @@ -316,6 +316,17 @@ class RedisConnectionPool { return true; } + + /** + * Make sure connections are closed for sanity + */ + function __destruct() { + foreach ( $this->connections as $server => &$serverConnections ) { + foreach ( $serverConnections as $key => &$connection ) { + $connection['conn']->close(); + } + } + } } /** -- 2.20.1