From 5a9c1237a18e36567973a64fa4e876161a2c8673 Mon Sep 17 00:00:00 2001 From: rand00 Date: Fri, 28 Jan 2022 10:45:00 +0100 Subject: [PATCH] Builder_web: Added timeout to visualization_cmd Lwt_process.pread --- lib/builder_web.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/builder_web.ml b/lib/builder_web.ml index df5e60b..2b127be 100644 --- a/lib/builder_web.ml +++ b/lib/builder_web.ml @@ -188,7 +188,9 @@ let add_routes datadir = let bin = "_build/default/bin/visualizations/builder_viz.exe" in let cmd = bin, Array.of_list (bin :: args) in - Lwt_process.pread ~stderr:`Dev_null cmd + Lwt_process.pread cmd + ~stderr:`Dev_null + ~timeout:15. |> Lwt_result.catch |> Lwt_result.map_err (fun exn -> Printexc.to_string exn, `Internal_Server_Error