From 67215ae5da5a3fc563fa8072ad8acfb402489b27 Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Thu, 15 Aug 2019 19:24:24 +0100 Subject: [PATCH] Changed nodeLink to setupLink --- tunnel/default.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tunnel/default.go b/tunnel/default.go index a3369f22..1bae0835 100644 --- a/tunnel/default.go +++ b/tunnel/default.go @@ -141,7 +141,7 @@ func (t *tun) monitor() { for _, node := range t.options.Nodes { t.Lock() if _, ok := t.links[node]; !ok { - link, err := t.nodeLink(node) + link, err := t.setupLink(node) if err != nil { log.Debugf("Tunnel failed to establish node link to %s: %v", node, err) continue @@ -365,9 +365,9 @@ func (t *tun) keepalive(link *link) { } } -// nodeLink attempts to connect to node and returns link if successful -// it returns error if the link failed to be established -func (t *tun) nodeLink(node string) (*link, error) { +// setupLink connects to node and returns link if successful +// It returns error if the link failed to be established +func (t *tun) setupLink(node string) (*link, error) { log.Debugf("Tunnel dialing %s", node) c, err := t.options.Transport.Dial(node) if err != nil { @@ -454,7 +454,7 @@ func (t *tun) connect() error { } // connect to node and return link - link, err := t.nodeLink(node) + link, err := t.setupLink(node) if err != nil { log.Debugf("Tunnel failed to establish node link to %s: %v", node, err) continue