Skip to content

Commit 1280bff

Browse files
committed
Remove unused function
Signed-off-by: Changlei Li <changlei.li@cloud.com>
1 parent fd15b46 commit 1280bff

2 files changed

Lines changed: 0 additions & 35 deletions

File tree

ocaml/libs/stunnel/stunnel.ml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -598,28 +598,6 @@ let wait_for_connection_done logfile =
598598
in
599599
check ~max_retries:10 0
600600
601-
let with_client_proxy_unix_socket ~verify_cert ~remote_host ~remote_port
602-
~unix_socket_path f =
603-
Unixext.unlink_safe unix_socket_path ;
604-
let write_to_log = D.debug "%s: %s" __FUNCTION__ in
605-
let pid, logfile =
606-
attempt_one_connect ~write_to_log ~extended_diagnosis:true
607-
(`Unix_socket_path unix_socket_path) verify_cert remote_host remote_port
608-
in
609-
let finally = Xapi_stdext_pervasives.Pervasiveext.finally in
610-
finally
611-
(fun () ->
612-
wait_for_init_done unix_socket_path logfile ;
613-
D.debug "%s: started stunnel proxy (pid:%d):%s -> %s:%d" __FUNCTION__
614-
(getpid pid) unix_socket_path remote_host remote_port ;
615-
f ~diagnose_stunnel:(fun () -> check_stunnel_status logfile)
616-
)
617-
(fun () ->
618-
disconnect_with_pid ~wait:false ~force:true pid ;
619-
Unixext.unlink_safe unix_socket_path ;
620-
Unixext.unlink_safe logfile
621-
)
622-
623601
module UnixSocketProxy = struct
624602
(** Handle for a long-running stunnel proxy *)
625603
type t = {proxy_pid: pid; proxy_socket_path: string; proxy_logfile: string}

ocaml/libs/stunnel/stunnel.mli

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,3 @@ val with_client_proxy_systemd_service :
178178
-> service:string
179179
-> (unit -> 'a)
180180
-> 'a
181-
182-
val with_client_proxy_unix_socket :
183-
verify_cert:verification_config option
184-
-> remote_host:string
185-
-> remote_port:int
186-
-> unix_socket_path:string
187-
-> (diagnose_stunnel:(unit -> (unit, stunnel_error) result) -> 'a)
188-
-> 'a
189-
(** Establish a connection to the specified [remote_host] and [remote_port]
190-
via a stunnel process, using a UNIX socket file at [unix_socket_path] to
191-
accept non-TLS traffic. The provided function (last parameter) can send
192-
traffic through the [unix_socket_path] to the [remote_host] and [remote_port]
193-
and check the stunnel error by invoking [diagnose_stunnel ()]. *)

0 commit comments

Comments
 (0)