Skip to content

Commit

Permalink
Add timeout to gpumon client
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
gthvn1 committed Nov 7, 2023
1 parent 3d32794 commit 637a14c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocaml/xapi-idl/gpumon/gpumon_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ())
Expand Down

0 comments on commit 637a14c

Please sign in to comment.