diff --git a/swarm.go b/swarm.go index 95b164d13c2b587712b27beb4e46334c35cd286d..1abe12273e83a161c5f1d34a23eeca2fbe6b661b 100644 --- a/swarm.go +++ b/swarm.go @@ -121,7 +121,7 @@ func NewSwarm(ctx context.Context, local peer.ID, peers peerstore.Peerstore, bwc } } - s.dsync = newDialSync(s.dialWorker) + s.dsync = newDialSync(s.startDialWorker) s.limiter = newDialLimiter(s.dialAddr, s.IsFdConsumingAddr) s.proc = goprocessctx.WithContext(ctx) s.ctx = goprocessctx.OnClosingContext(s.proc) diff --git a/swarm_dial.go b/swarm_dial.go index c656df5a269fd308804e3c9205dc94970b93ce61..d60c9f39bbf2c7f12c468f338c412072b24a6f6b 100644 --- a/swarm_dial.go +++ b/swarm_dial.go @@ -295,8 +295,8 @@ type dialResponse struct { err error } -// dialWorker is an active dial goroutine that synchronizes and executes concurrent dials -func (s *Swarm) dialWorker(ctx context.Context, p peer.ID, reqch <-chan dialRequest) error { +// startDialWorker starts an active dial goroutine that synchronizes and executes concurrent dials +func (s *Swarm) startDialWorker(ctx context.Context, p peer.ID, reqch <-chan dialRequest) error { if p == s.local { return ErrDialToSelf }