From 1a4d0d708bdfc333c81cfd1b74b049df61ebe4bf Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 17 Mar 2020 20:54:32 -0700 Subject: [PATCH] fix: make sure to include peer in dial error --- swarm_dial.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swarm_dial.go b/swarm_dial.go index 475a7e2..f2b21ab 100644 --- a/swarm_dial.go +++ b/swarm_dial.go @@ -387,7 +387,7 @@ func (s *Swarm) dialAddrs(ctx context.Context, p peer.ID, remoteAddrs <-chan ma. // use a single response type instead of errs and conns, reduces complexity *a ton* respch := make(chan dialResult) - err := new(DialError) + err := &DialError{Peer: p} defer s.limiter.clearAllPeerDials(p) -- GitLab