mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +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())
|
// history channel is closed, waiting for new state (called from sync())
|
||||||
syncStates = self.syncStates
|
syncStates = self.syncStates
|
||||||
state.Synced = true // this signals that the current segment is complete
|
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
|
justSynced = true
|
||||||
history = nil
|
history = nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue