From cdef279a6b3050228b59d45667a4e7dada7b678b Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Wed, 6 Feb 2019 14:01:41 +0100 Subject: [PATCH] swarm/network: remove quitFunc --- swarm/network/fetcher.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/swarm/network/fetcher.go b/swarm/network/fetcher.go index 1d29b87277..6b21751669 100644 --- a/swarm/network/fetcher.go +++ b/swarm/network/fetcher.go @@ -53,7 +53,6 @@ type Fetcher struct { searchTimeout time.Duration skipCheck bool ctx context.Context - quitFunc func() } type Request struct { @@ -127,8 +126,6 @@ func NewFetcher(ctx context.Context, addr storage.Address, rf RequestFunc, skipC searchTimeout: defaultSearchTimeout, skipCheck: skipCheck, ctx: ctx, - quitFunc: func() { - }, } } @@ -227,7 +224,6 @@ func (f *Fetcher) run(peers *sync.Map) { case <-f.ctx.Done(): log.Trace("terminate fetcher", "request addr", f.addr) // TODO: send cancellations to all peers left over in peers map (i.e., those we requested from) - f.quitFunc() return }