Skip to content

Commit

Permalink
matts fix, rm 3.6 code
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Reggi committed May 7, 2020
1 parent d75b406 commit f381018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/connection_string.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,14 +720,6 @@ function parseConnectionString(uri, options, callback) {
return callback(new MongoParseError('directConnection option requires exactly one host'));
}

// NOTE: this behavior will go away in v4.0, we will always auto discover there
if (
parsedOptions.directConnection == null &&
hosts.length === 1 &&
parsedOptions.replicaSet == null
) {
parsedOptions.directConnection = true;
}

const result = {
hosts: hosts,
Expand Down
4 changes: 4 additions & 0 deletions lib/sdam/server_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ function readPreferenceServerSelector(readPreference) {
);
}

if (topologyDescription.type === TopologyType.Unknown) {
return [];
}

if (
topologyDescription.type === TopologyType.Single ||
topologyDescription.type === TopologyType.Sharded
Expand Down

0 comments on commit f381018

Please sign in to comment.