Skip to content

Commit

Permalink
fix: compat with lwt < 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jan 31, 2025
1 parent 92613d8 commit 66573bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/client-cohttp-lwt/opentelemetry_client_cohttp_lwt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ module Config = Config
open Opentelemetry
include Common_

external reraise : exn -> 'a = "%reraise"
(** This is equivalent to [Lwt.reraise]. We inline it here so we don't force
to use Lwt's latest version *)

let needs_gc_metrics = Atomic.make false

let last_gc_metrics = Atomic.make (Mtime_clock.now ())
Expand Down Expand Up @@ -605,6 +609,6 @@ let with_setup ?stop ?(config = Config.make ()) ?(enable = true) () f : _ Lwt.t
(fun exn ->
cleanup ();
let* () = cleanup_done in
Lwt.reraise exn)
reraise exn)
else
f ()

0 comments on commit 66573bd

Please sign in to comment.