Health: disconnect from DB on destruction
This commit is contained in:
parent
fae6162133
commit
ec1b3ff8d1
|
@ -274,4 +274,12 @@ class Health
|
||||||
|
|
||||||
return $check;
|
return $check;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __destruct()
|
||||||
|
{
|
||||||
|
if ($this->connection !== null) {
|
||||||
|
// We created our own connection, so let's tear it down
|
||||||
|
$this->connection->getDbAdapter()->closeConnection();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue