From a4e2f9955c4b8332becf1cae28b55fdc396867c4 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sun, 12 May 2024 11:30:00 -0600 Subject: [PATCH] fix(lev-fiber): fd leak when running scheduler (#95) Signed-off-by: Rudi Grinberg --- lev-fiber/src/lev_fiber.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lev-fiber/src/lev_fiber.ml b/lev-fiber/src/lev_fiber.ml index c4a98bd..89056d1 100644 --- a/lev-fiber/src/lev_fiber.ml +++ b/lev-fiber/src/lev_fiber.ml @@ -1276,6 +1276,7 @@ let run (type a) ?(sigpipe = `Inherit) List.iter t.thread_workers ~f:(fun (Worker w) -> Worker.complete_tasks_and_stop w; Worker.join w); - Lev.Async.destroy async + Lev.Async.destroy async; + Lev.Loop.destroy lev_loop in res