Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
fix(mongo): Ensure correct readPreference
Browse files Browse the repository at this point in the history
  • Loading branch information
ht2 committed Feb 12, 2019
1 parent e709abb commit e7746b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import * as os from 'os';

const DEFAULT_TIMEOUT_MS = 300000; // 5 minutes.

const getMongoReadPreference = (readPrefMode = 'PRIMARY'): ReadPreference => {
const mode = ReadPreference.isValid(readPrefMode) ? readPrefMode : 'PRIMARY';
const getMongoReadPreference = (readPrefMode = 'primary'): ReadPreference => {
const mode = ReadPreference.isValid(readPrefMode) ? readPrefMode : 'primary';
return new ReadPreference(mode, []);
};

Expand Down

0 comments on commit e7746b3

Please sign in to comment.