Health: disconnect from DB on destruction

This commit is contained in:
Thomas Gelf 2018-02-20 15:35:39 +01:00
parent fae6162133
commit ec1b3ff8d1
1 changed files with 8 additions and 0 deletions

View File

@ -274,4 +274,12 @@ class Health
return $check;
}
public function __destruct()
{
if ($this->connection !== null) {
// We created our own connection, so let's tear it down
$this->connection->getDbAdapter()->closeConnection();
}
}
}