From 59006419d1b7a2441726c752b27ccf0df0bd4359 Mon Sep 17 00:00:00 2001 From: vyzo Date: Tue, 30 Mar 2021 21:35:48 +0300 Subject: [PATCH] clear address dial when they fail because of backoff makes TestDialBackoff happy --- swarm_dial.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/swarm_dial.go b/swarm_dial.go index ae4c87f..9b10db1 100644 --- a/swarm_dial.go +++ b/swarm_dial.go @@ -517,6 +517,11 @@ loop: delete(requests, reqno) } } + + // if it was a backoff, clear the address dial so that it doesn't inhibit new dial requests + if res.err == ErrDialBackoff { + delete(pending, res.addr) + } } } } -- GitLab