diff options
author | John Estabrook <jestabro@vyos.io> | 2024-10-23 18:50:46 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-10-27 21:49:53 -0500 |
commit | 54c0bb263de60e328a3af62e1faccf2bfeb05df0 (patch) | |
tree | 667987d4bfb9344bd62854c97f2170df981d97d6 /src/vyconfd.ml | |
parent | 4aee642874a29f4f77704c97286f201d3c4bd2c3 (diff) | |
download | vyconf-54c0bb263de60e328a3af62e1faccf2bfeb05df0.tar.gz vyconf-54c0bb263de60e328a3af62e1faccf2bfeb05df0.zip |
T6718: drop unnecessary reference to file descriptor
Diffstat (limited to 'src/vyconfd.ml')
-rw-r--r-- | src/vyconfd.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vyconfd.ml b/src/vyconfd.ml index a445864..16f41a6 100644 --- a/src/vyconfd.ml +++ b/src/vyconfd.ml @@ -150,7 +150,7 @@ let send_response oc resp = let%lwt () = Vyconf_connect.Message.write oc resp_msg in Lwt.return () -let rec handle_connection world ic oc fd () = +let rec handle_connection world ic oc () = try%lwt let%lwt req_msg = Vyconf_connect.Message.read ic in let%lwt req = @@ -181,19 +181,19 @@ let rec handle_connection world ic oc fd () = end) |> Lwt.return in let%lwt () = send_response oc resp in - handle_connection world ic oc fd () + handle_connection world ic oc () with | Failure e -> let%lwt () = Lwt_log.error e in let%lwt () = send_response oc ({response_tmpl with status=Fail; error=(Some e)}) in - handle_connection world ic oc fd () + handle_connection world ic oc () | End_of_file -> Lwt_log.info "Connection closed" >>= return let accept_connection world conn = let fd, _ = conn in let ic = Lwt_io.of_fd ~mode:Lwt_io.Input fd in let oc = Lwt_io.of_fd ~mode:Lwt_io.Output fd in - Lwt.on_failure (handle_connection world ic oc fd ()) (fun e -> Lwt_log.ign_error (Printexc.to_string e)); + Lwt.on_failure (handle_connection world ic oc ()) (fun e -> Lwt_log.ign_error (Printexc.to_string e)); Lwt_log.info "New connection" >>= return let main_loop basepath world () = |