Exponential backoff retry logic
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocaml-retry: collapse retry.mli example to single-line match

Pure formatting: the should_retry function fits on one line. dune fmt
keeps proposing the change; commit it once so the working tree stays
clean.

+1 -4
+1 -4
lib/retry.mli
··· 14 14 Eio_main.run @@ fun env -> 15 15 let clock = Eio.Stdenv.clock env in 16 16 let config = Retry.config ~max_retries:5 () in 17 - let should_retry = function 18 - | Failure _ -> true 19 - | _ -> false 20 - in 17 + let should_retry = function Failure _ -> true | _ -> false in 21 18 Retry.with_retry ~clock ~config ~should_retry connect_to_server 22 19 ]} *) 23 20