We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5e649b commit 0bf8687Copy full SHA for 0bf8687
protocol/chainsync/client.go
@@ -146,7 +146,10 @@ func (c *Client) Sync(intersectPoints []common.Point) error {
146
func (c *Client) syncLoop() {
147
for {
148
// Wait for a block to be received
149
- <-c.readyForNextBlockChan
+ if _, ok := <-c.readyForNextBlockChan; !ok {
150
+ // Channel is closed, which means we're shutting down
151
+ return
152
+ }
153
c.busyMutex.Lock()
154
// Request the next block
155
// In practice we already have multiple block requests pipelined
0 commit comments