mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/expool: unsubscribe the event scope
This commit is contained in:
parent
43d5627e46
commit
7b5d0a0e58
1 changed files with 3 additions and 1 deletions
|
|
@ -155,13 +155,15 @@ func (p *TxPool) Close() error {
|
|||
if err := <-errc; err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
|
||||
// Terminate each subpool
|
||||
for _, subpool := range p.subpools {
|
||||
if err := subpool.Close(); err != nil {
|
||||
errs = append(errs, err)
|
||||
}
|
||||
}
|
||||
// Unsubscribe anyone still listening for tx events
|
||||
p.subs.Close()
|
||||
|
||||
if len(errs) > 0 {
|
||||
return fmt.Errorf("subpool close errors: %v", errs)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue