Skip to content

Commit

Permalink
fix(mongo client): send error to cb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jessica Lord committed Nov 20, 2017
1 parent cd10084 commit eafc9e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ var connect = function(self, url, options, callback) {

// Failure modes
if (object.servers.length === 0) {
throw new Error('connection string must contain at least one seed host');
return callback(new Error('connection string must contain at least one seed host'));
}

// Do we have a replicaset then skip discovery and go straight to connectivity
Expand Down

0 comments on commit eafc9e2

Please sign in to comment.