From dc148ae0fa2c8af4d66fc9b37efd1033452bcf49 Mon Sep 17 00:00:00 2001 From: Christian Klaussner Date: Sat, 1 Feb 2020 19:36:34 +0100 Subject: [PATCH] Remove deprecated MongoDB connection options. (#10889) The `autoReconnect` and `reconnectTries` options are incompatible with the unified topology: http://mongodb.github.io/node-mongodb-native/3.3/reference/unified-topology/ --- packages/mongo/mongo_driver.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/mongo/mongo_driver.js b/packages/mongo/mongo_driver.js index cfd9f2a4b2..4be68220e6 100644 --- a/packages/mongo/mongo_driver.js +++ b/packages/mongo/mongo_driver.js @@ -134,11 +134,6 @@ MongoConnection = function (url, options) { self._onFailoverHook = new Hook; var mongoOptions = Object.assign({ - // Reconnect on error. - autoReconnect: true, - // Try to reconnect forever, instead of stopping after 30 tries (the - // default), with each attempt separated by 1000ms. - reconnectTries: Infinity, ignoreUndefined: true, // Required to silence deprecation warnings with mongodb@3.2.1. useUnifiedTopology: true,