Mongoose 4.x (#9928)

* update mongoose to ^4.x

* another fix
This commit is contained in:
Matteo Pagliazzi
2018-02-02 16:37:36 +01:00
committed by GitHub
parent 389d6f18b4
commit 1fbdb7dbd0
8 changed files with 531 additions and 340 deletions

View File

@@ -736,7 +736,7 @@ async function _updateUserWithRetries (userId, updates, numTry = 1, query = {})
return raw;
}).catch((err) => {
if (numTry < MAX_UPDATE_RETRIES) {
return _updateUserWithRetries(userId, updates, ++numTry);
return _updateUserWithRetries(userId, updates, ++numTry, query);
} else {
throw err;
}