diff --git a/connect/host.go b/connect/host.go index f786293a5e892b690f15b3f2346480758906c59c..227bd9d001a72631ec0a7c1f4d0a6bdbb6c479c8 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 {