From b50688b4de938cb8236c378510aaea4c459d1673 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Tue, 31 Mar 2015 11:05:11 +0100 Subject: [PATCH] act immediately on `weave connect`ing existing addresses we simply reset the vars controlling backoff for that address Note that we do not interrupt any current connection attempt, since that is hard. Closes #499. --- router/connection_maker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/router/connection_maker.go b/router/connection_maker.go index 84808159..67a002d2 100644 --- a/router/connection_maker.go +++ b/router/connection_maker.go @@ -48,6 +48,9 @@ func (cm *ConnectionMaker) Start() { func (cm *ConnectionMaker) InitiateConnection(address string) { cm.actionChan <- func() bool { cm.cmdLineAddress[NormalisePeerAddr(address)] = true + if target, found := cm.targets[address]; found { + target.tryAfter, target.tryInterval = tryImmediately() + } return true } }