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/
This commit is contained in:
Christian Klaussner
2020-02-01 19:36:34 +01:00
committed by GitHub
parent 018d5a9f4c
commit dc148ae0fa

View File

@@ -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,