فهرست منبع

bug fix in backoff

Brian Gough 9 سال پیش
والد
کامیت
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)