lithium\data\source\MongoDb::disconnect()
Implements
lithium\data\Source::disconnect()
Disconnect from the Mongo server.
Don't call the Mongo->close() method. The driver documentation states this should not be necessary since it auto disconnects when out of scope. With version 1.2.7, when using replica sets, close() can cause a segmentation fault.
Returns
booleanTrue
Source
public function disconnect() {
if ($this->server && $this->server->getConnections()) {
$this->_isConnected = false;
unset($this->connection, $this->server);
}
return true;
}