/**
* Forcefully closes a connection to the database,
* even if persistent connections are being used.
*
* [!!] This is called automatically by [\Gleez\Mango\Client::__destruct].
*/
public function disconnect()
{
if ($this->isConnected()) {
$connections = $this->connection->getConnections();
foreach ($connections as $connection) {
// Close the connection to Mongo
$this->connection->close($connection['hash']);
}
$this->db = $this->benchmark = null;
$this->connected = false;
}
}