diff options
author | John Estabrook <jestabro@vyos.io> | 2025-03-30 22:29:35 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2025-03-31 00:50:30 -0500 |
commit | ab010dbe993afc990fafa4525e1a94670ca7f5a4 (patch) | |
tree | 610d48220e115555d1770f9d7631999b3101bd80 /src/vycall_client.ml | |
parent | c7b81cca1e181103d28ec2493aae67818bc14dd1 (diff) | |
download | vyconf-ab010dbe993afc990fafa4525e1a94670ca7f5a4.tar.gz vyconf-ab010dbe993afc990fafa4525e1a94670ca7f5a4.zip |
T7272: call both Lwt connections under a single Lwt.main
Call both the vyconfd server and the vyos-commitd client under the
top-level Lwt.main loop.
Diffstat (limited to 'src/vycall_client.ml')
-rw-r--r-- | src/vycall_client.ml | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vycall_client.ml b/src/vycall_client.ml index 140fe2a..11bbe3f 100644 --- a/src/vycall_client.ml +++ b/src/vycall_client.ml @@ -86,10 +86,8 @@ let create sockfile = let do_commit commit_data = let session = commit_data_to_commit_proto commit_data in - let run () = - let sockfile = "/run/vyos-commitd.sock" in - let%lwt client = create sockfile in - let%lwt resp = do_call client session in - let%lwt () = Lwt_io.close client.oc in - Lwt.return (commit_proto_to_commit_data resp commit_data) - in Lwt_main.run @@ run () + let sockfile = "/run/vyos-commitd.sock" in + let%lwt client = create sockfile in + let%lwt resp = do_call client session in + let%lwt () = Lwt_io.close client.oc in + Lwt.return(commit_proto_to_commit_data resp commit_data) |