From 637a14c1d9f1cea236a2087f2c085c27427fb02f Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 6 Nov 2023 14:33:19 +0100 Subject: [PATCH] Add timeout to gpumon client It can happens that the message switch queue for gpumon is not available and in this case the RPC is never answered. To avoid waiting forever we add a timeout. Signed-off-by: Guillaume --- ocaml/xapi-idl/gpumon/gpumon_client.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/xapi-idl/gpumon/gpumon_client.ml b/ocaml/xapi-idl/gpumon/gpumon_client.ml index d6605ff759e..ed2ef8761f4 100644 --- a/ocaml/xapi-idl/gpumon/gpumon_client.ml +++ b/ocaml/xapi-idl/gpumon/gpumon_client.ml @@ -16,7 +16,7 @@ let xml_url () = "file:" ^ Gpumon_interface.xml_path let rpc call = if !Xcp_client.use_switch then - Xcp_client.json_switch_rpc Gpumon_interface.queue_name call + Xcp_client.json_switch_rpc ~timeout:10 Gpumon_interface.queue_name call else Xcp_client.xml_http_rpc ~srcstr:(Xcp_client.get_user_agent ())