Socket
Socket
Sign inDemoInstall

mongodb-core

Package Overview
Dependencies
2
Maintainers
3
Versions
177
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.19 to 2.1.20

18

lib/topologies/replset_state.js

@@ -762,4 +762,4 @@ "use strict"

// Add primary to list if not a secondary read preference
if(self.primary
&& readPreference.preference != 'secondary'
if(self.primary
&& readPreference.preference != 'secondary'
&& readPreference.preference != 'secondaryPreferred') {

@@ -775,4 +775,4 @@ servers.push(self.primary);

// If we have a secondaryPreferred readPreference and no server add the primary
if(self.primary
&& servers.length == 0
if(self.primary
&& servers.length == 0
&& readPreference.preference != 'secondaryPreferred') {

@@ -796,4 +796,3 @@ servers.push(self.primary);

servers.sort(function(a, b) {
// return a.time > b.time;
return a.lastIsMasterMS > b.lastIsMasterMS
return a.lastIsMasterMS - b.lastIsMasterMS
});

@@ -822,3 +821,3 @@

// Add primary to list if not a secondary read preference
if(self.primary
if(self.primary
&& readPreference.preference != 'secondary'

@@ -835,3 +834,3 @@ && readPreference.preference != 'secondaryPreferred') {

// If we have a secondaryPreferred readPreference and no server add the primary
if(servers.length == 0
if(servers.length == 0
&& self.primary

@@ -847,4 +846,3 @@ && readPreference.preference != 'secondaryPreferred') {

servers.sort(function(a, b) {
// return a.time > b.time;
return a.lastIsMasterMS > b.lastIsMasterMS
return a.lastIsMasterMS - b.lastIsMasterMS
});

@@ -851,0 +849,0 @@

{
"name": "mongodb-core",
"version": "2.1.19",
"version": "2.1.20",
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc