Remove deprecated mongo connection options, fixes #8079 (#8174)

fix #8079 
Unified Topology changes the concept of connecting and causes isConnected to always return true, making any reconnection options useless. Next major version of the driver will remove isConnected entirely.
So:
- reconnect tries
- reconnectInterval
- autoReconnect

Are deprecated and don't really do anything anymore (when unified topology is used at least) other than causing warnings at startup since the 3.4 version of the driver (the current version used by NodeBB is 3.5).

Reference: http://mongodb.github.io/node-mongodb-native/3.5/reference/unified-topology/
v1.18.x
Opliko 5 years ago committed by GitHub
parent 3c9689a5ac
commit 41c20761e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,9 +45,6 @@ connection.getConnectionOptions = function (mongo) {
mongo = mongo || nconf.get('mongo');
var connOptions = {
poolSize: 10,
reconnectTries: 3600,
reconnectInterval: 1000,
autoReconnect: true,
connectTimeoutMS: 90000,
useNewUrlParser: true,
useUnifiedTopology: true,

Loading…
Cancel
Save