Brian Gough 9 лет назад
Родитель
Сommit
dff6e2c3da
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/document-updater/app/coffee/LockManager.coffee

+ 1 - 1
services/document-updater/app/coffee/LockManager.coffee

@@ -56,7 +56,7 @@ module.exports = LockManager =
 				else
 					setTimeout attempt, testInterval
 					# back off when the lock is taken to avoid overloading
-					testInterval = Math.max(testInterval * 2, LockManager.MAX_TEST_INTERVAL)
+					testInterval = Math.min(testInterval * 2, LockManager.MAX_TEST_INTERVAL)
 
 	checkLock: (doc_id, callback = (err, isFree)->)->
 		key = keys.blockingKey(doc_id:doc_id)