From d95fe8906580c0765154570f89933fab7f5b5369 Mon Sep 17 00:00:00 2001 From: Jake Taylor <jake@elixxir.io> Date: Fri, 11 Mar 2022 13:24:15 -0600 Subject: [PATCH] add public Host.Connect function --- connect/host.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/connect/host.go b/connect/host.go index f786293..227bd9d 100644 --- a/connect/host.go +++ b/connect/host.go @@ -275,6 +275,14 @@ func (h *Host) transmit(f func(conn *grpc.ClientConn) (interface{}, return a, err } +// Connect allows manual connection to the host if it does not have a valid connection +func (h *Host) Connect() error { + h.connectionMux.Lock() + defer h.connectionMux.Unlock() + + return h.connect() +} + // connect attempts to connect to the host if it does not have a valid connection func (h *Host) connect() error { -- GitLab