lithium\data\source\MongoDb::disconnect()

public method

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

boolean

True

Source

	public function disconnect() {
		if ($this->server && $this->server->getConnections()) {
			$this->_isConnected = false;
			unset($this->connection, $this->server);
		}
		return true;
	}