Permalink
Browse files

Workaround for: Failed to fetch stats from backend: redis: nil (#5)

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 21734d8df34fcf33b48856617785f5fef33316de
Showing with 1 addition and 1 deletion.
  1. +1 −1 storage/redis.go
View
@@ -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
}

0 comments on commit 21734d8

Please sign in to comment.