Module Make.Deprecated
val spawn_and_connect : (?umask:int -> redirect_stdout:Fd_redirection.t -> redirect_stderr:Fd_redirection.t -> connection_state_init_arg:connection_state_init_arg -> worker_state_init_arg -> (t * Connection.t) Core.Or_error.t Async.Deferred.t) with_spawn_args
This is nearly identical to calling
spawn ~shutdown_on:Heartbeater_connection_timeout
and thenConnection.client
. The only difference is that this function handles shutting down the worker whenConnection.client
returns an error.Uses of
spawn_and_connect
that disregardt
can likely be replaced withspawn ~shutdown_on:Connection_closed
. Ift
is used for reconnecting, then you can usespawn
followed byConnection.client
.
val spawn_and_connect_exn : (?umask:int -> redirect_stdout:Fd_redirection.t -> redirect_stderr:Fd_redirection.t -> connection_state_init_arg:connection_state_init_arg -> worker_state_init_arg -> (t * Connection.t) Async.Deferred.t) with_spawn_args