forked from cerc-io/plugeth
eth: better active protocol handler tracking (#27665)
Fixes an issue where waitgroups were used erroneously, which could lead to waitgroup being added to while wait was already invoked.
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ func newChainSyncer(handler *handler) *chainSyncer {
|
||||
// handlePeerEvent notifies the syncer about a change in the peer set.
|
||||
// This is called for new peers and every time a peer announces a new
|
||||
// chain head.
|
||||
func (cs *chainSyncer) handlePeerEvent(peer *eth.Peer) bool {
|
||||
func (cs *chainSyncer) handlePeerEvent() bool {
|
||||
select {
|
||||
case cs.peerEventCh <- struct{}{}:
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user