From be3e9404cc91b9fd10b76c54a101c1104bebae57 Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 1 Apr 2021 23:11:25 +0300 Subject: [PATCH] rename dialWorker to startDialWorker --- swarm.go | 2 +- swarm_dial.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/swarm.go b/swarm.go index 95b164d..1abe122 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 c656df5..d60c9f3 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 } -- GitLab