mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-18 22:09:26 +00:00
eth/syncer: stop ticker to prevent resource leak (#32443)
This commit is contained in:
parent
5b2fc67eee
commit
7cc01375ef
1 changed files with 1 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ func (s *Syncer) run() {
|
||||||
target *types.Header
|
target *types.Header
|
||||||
ticker = time.NewTicker(time.Second * 5)
|
ticker = time.NewTicker(time.Second * 5)
|
||||||
)
|
)
|
||||||
|
defer ticker.Stop()
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case req := <-s.request:
|
case req := <-s.request:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue