Skip to content

Commit

Permalink
eth/catalyst: fix ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 committed Oct 25, 2022
1 parent 902bcfa commit cd11d3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eth/catalyst/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ func (tester *FullSyncTester) Start() error {
go func() {
defer tester.wg.Done()

ticker := time.NewTicker(time.Second * 5)
defer ticker.Stop()

for {
select {
case <-time.NewTicker(time.Second * 5).C:
case <-ticker.C:
// Don't bother downloader in case it's already syncing.
if tester.api.eth.Downloader().Synchronising() {
continue
Expand Down

0 comments on commit cd11d3c

Please sign in to comment.