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_argsThis is nearly identical to calling
spawn ~shutdown_on:Heartbeater_timeoutand thenConnection.client. The only difference is that this function handles shutting down the worker whenConnection.clientreturns an error.Uses of
spawn_and_connectthat disregardtcan likely be replaced withspawn ~shutdown_on:Disconnect. Iftis used for reconnecting, then you can usespawnfollowed 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