From de35ae3bae0c2e3418ed6b36b044c1fa256e22cc Mon Sep 17 00:00:00 2001 From: galal-hussein Date: Sat, 9 Dec 2017 03:23:02 +0200 Subject: [PATCH] Fix redundant ssh tunnels for hosts --- hosts/dialer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/dialer.go b/hosts/dialer.go index 22769ed1..70f300ea 100644 --- a/hosts/dialer.go +++ b/hosts/dialer.go @@ -51,6 +51,9 @@ func (d *dialer) Dial(network, addr string) (net.Conn, error) { } func (h *Host) TunnelUp() error { + if h.DClient != nil { + return nil + } logrus.Infof("[ssh] Setup tunnel for host [%s]", h.Address) key, err := checkEncryptedKey(h.SSHKey, h.SSHKeyPath) if err != nil {