diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/shell/replsettest.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index ad126bfa603..cbfa0268880 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -1706,9 +1706,9 @@ var ReplSetTest = function(opts) { this.getHashes = function(dbName, slaves) { assert.neq(dbName, 'local', 'Cannot run getHashes() on the "local" database'); - // getPrimary() repopulates 'self._slaves'. - this.getPrimary(); - slaves = slaves || this._slaves; + // _determineLiveSlaves() repopulates both 'self._slaves' and 'self._master'. If we're + // passed an explicit set of slaves we don't want to do that. + slaves = slaves || _determineLiveSlaves(); const sessions = [ this._master, |