From: Aaron Schulz Date: Tue, 5 Nov 2013 22:18:07 +0000 (-0800) Subject: Added some sanity close() calls to RedisConnectionPool X-Git-Tag: 1.31.0-rc.0~17985^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=ee574b9c6aff00929b46e87dba6ddde2166a409f;p=lhc%2Fweb%2Fwiklou.git Added some sanity close() calls to RedisConnectionPool Change-Id: Icd0e249a1524f880c99986c9bea3b891ab9b9ba6 --- 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(); + } + } + } } /**