mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 10:57:42 +08:00
fix(bitswap) stop the ticker when the run loop exits
@whyrusleeping License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
This commit is contained in:
parent
11f2856d31
commit
a5754a5ff4
@ -170,6 +170,7 @@ func (bs *bitswap) run(ctx context.Context) {
|
||||
rebroadcastTime := time.Second * 5
|
||||
|
||||
broadcastSignal := time.NewTicker(bs.strategy.GetRebroadcastDelay())
|
||||
defer broadcastSignal.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user