diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index d54cf4968b..182706d63c 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -224,7 +224,10 @@ func (p *TxPool) loop(head *types.Header, chain BlockChain) { for _, subpool := range p.subpools { subpool.Reset(oldHead, newHead) } - resetDone <- newHead + select { + case resetDone <- newHead: + case <-p.term: + } }(oldHead, newHead) // If the reset operation was explicitly requested, consider it