mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
syncer: fix process leak by adding select to state.synced <- false
This commit is contained in:
parent
b610c58875
commit
7925859193
1 changed files with 5 additions and 1 deletions
|
|
@ -477,7 +477,11 @@ LOOP:
|
|||
// history channel is closed, waiting for new state (called from sync())
|
||||
syncStates = self.syncStates
|
||||
state.Synced = true // this signals that the current segment is complete
|
||||
state.synced <- false
|
||||
select {
|
||||
case state.synced <- false:
|
||||
case <-self.quit:
|
||||
break LOOP
|
||||
}
|
||||
justSynced = true
|
||||
history = nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue