Skip to content

Commit c2ebb6f

Browse files
committed
Fix listen subscription exit
1 parent 92616fc commit c2ebb6f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/load/listen/newhead.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ func subscriptionChToSignal(listenStop <-chan struct{}, listenDone, ready chan<-
6565
case <-listenStop:
6666
return
6767
case header := <-subCh:
68-
newHeadCh <- header.Number.Uint64()
68+
select {
69+
case newHeadCh <- header.Number.Uint64():
70+
case <-listenStop:
71+
return
72+
}
6973
}
7074
}
7175
}

0 commit comments

Comments
 (0)