From e8ca44c808c8f0913316a574fd6c2e3254850e23 Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Fri, 29 Sep 2017 02:33:59 -0700 Subject: [PATCH] Ensures retry is tailrec Summary: Hopefully next time the backtrace will be shorter. Reviewed By: jberdine Differential Revision: D5931724 fbshipit-source-id: 2fb39e8 --- infer/src/base/Serialization.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infer/src/base/Serialization.ml b/infer/src/base/Serialization.ml index 5ef79a35e..4631cb0be 100644 --- a/infer/src/base/Serialization.ml +++ b/infer/src/base/Serialization.ml @@ -46,7 +46,7 @@ let retry_exception ~timeout ~catch_exn ~f x = let expired () = Unix.gettimeofday () -. init_time >= timeout in let rec retry () = try f x - with e when catch_exn e && not (expired ()) -> retry () + with e when catch_exn e && not (expired ()) -> (retry [@tailcall]) () in retry ()