mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
swarm/network: remove quitFunc
This commit is contained in:
parent
6f4dcb14c6
commit
cdef279a6b
1 changed files with 0 additions and 4 deletions
|
|
@ -53,7 +53,6 @@ type Fetcher struct {
|
||||||
searchTimeout time.Duration
|
searchTimeout time.Duration
|
||||||
skipCheck bool
|
skipCheck bool
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
quitFunc func()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Request struct {
|
type Request struct {
|
||||||
|
|
@ -127,8 +126,6 @@ func NewFetcher(ctx context.Context, addr storage.Address, rf RequestFunc, skipC
|
||||||
searchTimeout: defaultSearchTimeout,
|
searchTimeout: defaultSearchTimeout,
|
||||||
skipCheck: skipCheck,
|
skipCheck: skipCheck,
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
quitFunc: func() {
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -227,7 +224,6 @@ func (f *Fetcher) run(peers *sync.Map) {
|
||||||
case <-f.ctx.Done():
|
case <-f.ctx.Done():
|
||||||
log.Trace("terminate fetcher", "request addr", f.addr)
|
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)
|
// TODO: send cancellations to all peers left over in peers map (i.e., those we requested from)
|
||||||
f.quitFunc()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue