Skip to content

Commit

Permalink
Don't use don't_wait_for in retry manager
Browse files Browse the repository at this point in the history
  • Loading branch information
leviroth committed Oct 8, 2023
1 parent 6e0f958 commit 2f71073
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reddit_api_async/retry_manager.ml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ let check_server t =

let on_transient_error t =
match t.state with
| Waiting_for_issue_resolution _ -> ()
| Waiting_for_issue_resolution _ -> return ()
| Working_normally ->
t.state <- Waiting_for_issue_resolution { finished = Ivar.create () };
don't_wait_for (check_server t)
check_server t
;;

let rec call t endpoint =
Expand All @@ -151,6 +151,6 @@ let rec call t endpoint =
"Transient error"
(request : Endpoint.Request.t)
(response : (_, Endpoint.Error.t Connection.Error.t) Result.t)];
on_transient_error t;
let%bind () = on_transient_error t in
call t endpoint)
;;

0 comments on commit 2f71073

Please sign in to comment.