From 023627631b1e4af5a47fc7cf6e2b7caa7cd7617c Mon Sep 17 00:00:00 2001 From: Lucas Santos Date: Fri, 14 Jul 2017 12:09:52 -0300 Subject: [PATCH] :bug: Fix bug with newer versions of mongoose Fixing bug described in https://github.com/Automattic/mongoose/issues/5442 --- src/mongo-connect.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mongo-connect.js b/src/mongo-connect.js index 13b10c6..e5f2c05 100644 --- a/src/mongo-connect.js +++ b/src/mongo-connect.js @@ -16,19 +16,15 @@ module.exports = function () { const options = { useMongoClient: true, - server: { auto_reconnect: true, socketOptions: { keepAlive: 1, - connectTimeoutMS: mongodbConnectionTimeout, + connectTimeoutMS: mongodbConnectionTimeout }, - }, - replset: { socketOptions: { keepAlive: 1, - connectTimeoutMS: mongodbConnectionTimeout, - }, - }, + connectTimeoutMS: mongodbConnectionTimeout + } }; if (mongodbReplicaSet) {