Skip to content

Commit

Permalink
godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Nov 25, 2024
1 parent cbfe3c9 commit c2c752d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions p2p/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ func (c *Client) retrieveBlockSyncLoop(ctx context.Context, msgHandler BlockSync
case <-ctx.Done():
return
case <-ticker.C:
// if no connected at p2p level, dont try
if len(c.Peers()) == 0 {
continue
}
Expand Down Expand Up @@ -662,6 +663,7 @@ func (c *Client) advertiseBlockSyncCids(ctx context.Context) {
case <-ctx.Done():
return
case <-ticker.C:
// if no connected at p2p level, it will try again after ticker time
if len(c.Peers()) == 0 {
continue
}
Expand Down Expand Up @@ -691,6 +693,7 @@ func (c *Client) advertiseBlockSyncCids(ctx context.Context) {
}

}
// just try once and then quit when finished
return
}
}
Expand Down

0 comments on commit c2c752d

Please sign in to comment.