fix in otel-lwt related to termination

Main_exporter.remove needs to actually shutdown the exporter, not just
create a promise that resolves when it's shutdown another way
This commit is contained in:
Simon Cruanes 2025-12-17 13:58:42 -05:00
parent bef4bd88b2
commit 14cd25d289
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -6,7 +6,7 @@ module Main_exporter = struct
let remove () : unit Lwt.t =
let p, resolve = Lwt.wait () in
Aswitch.on_turn_off (active ()) (fun () -> Lwt.wakeup_later resolve ());
remove () ~on_done:(fun () -> Lwt.wakeup_later resolve ());
p
end