From 669bc32eda313ce8738c974337d75ba745229b86 Mon Sep 17 00:00:00 2001 From: Alessandro Strada Date: Sat, 19 Nov 2016 17:45:55 +0100 Subject: [PATCH] Refactor time capping waiting for a resource --- src/drive.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drive.ml b/src/drive.ml index 5f074be..185fb69 100644 --- a/src/drive.ml +++ b/src/drive.ml @@ -1147,7 +1147,7 @@ let download_resource resource = "Already downloading resource (id=%Ld): check number %d\n%!" resource.Cache.Resource.id n; - let n' = if n > 6 then 6 else n in + let n' = min n 6 in GapiUtils.wait_exponential_backoff n'; check_state (n + 1) end