mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
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/
This commit is contained in:
@@ -45,9 +45,6 @@ connection.getConnectionOptions = function (mongo) {
|
|||||||
mongo = mongo || nconf.get('mongo');
|
mongo = mongo || nconf.get('mongo');
|
||||||
var connOptions = {
|
var connOptions = {
|
||||||
poolSize: 10,
|
poolSize: 10,
|
||||||
reconnectTries: 3600,
|
|
||||||
reconnectInterval: 1000,
|
|
||||||
autoReconnect: true,
|
|
||||||
connectTimeoutMS: 90000,
|
connectTimeoutMS: 90000,
|
||||||
useNewUrlParser: true,
|
useNewUrlParser: true,
|
||||||
useUnifiedTopology: true,
|
useUnifiedTopology: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user