Skip to content

Commit

Permalink
Workaround for: Failed to fetch stats from backend: redis: nil (#5)
Browse files Browse the repository at this point in the history
Before any blocks are found I was getting "Failed to fetch stats from backend: redis: nil" and the web UI would not render anything.

This is a work around for this issue that happens when redis returns redis.Nil due to a key not found error in CollectStats.

A similar issue was reported upstream: sammy007#327

Watching that issue to see how it is resolved.
  • Loading branch information
stevemulligan authored and ellaismer committed Apr 6, 2018
1 parent e04ef19 commit 21734d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/redis.go
Expand Up @@ -730,7 +730,7 @@ func (r *RedisClient) CollectStats(smallWindow time.Duration, maxBlocks, maxPaym
return nil
})

if err != nil {
if (err != nil) && (err != redis.Nil) {
return nil, err
}

Expand Down

0 comments on commit 21734d8

Please sign in to comment.