disconnect() public method

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.
public disconnect ( ) : boolean
return boolean True
Beispiel #1
0
 public function testBadConnection()
 {
     $db = new MongoDb(array('host' => null, 'autoConnect' => false));
     $this->expectException('Could not connect to the database.');
     $this->assertFalse($db->connect());
     $this->assertTrue($db->disconnect());
 }
Beispiel #2
0
 public function testBadConnection()
 {
     $db = new MongoDb(array('host' => null, 'autoConnect' => false));
     $this->assertFalse($db->connect());
     $this->assertTrue($db->disconnect());
 }