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