Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/mongodb/connection/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Server.prototype.connect = function(dbInstance, options, callback) {
var connection = connectionPool.checkoutConnection();
// Set server state to connected
server._serverState = 'connected';
dbInstance._state = 'connected'; //Avoid trapped in db connecting state if mistakenly call db.open first and server connect afterward

// Register handler for messages
dbInstance._registerHandler(db_command, false, connection, connectHandler);
Expand Down