diff --git a/pkg/store/proxy_merge.go b/pkg/store/proxy_merge.go index fa002cc9b1..e2764d574a 100644 --- a/pkg/store/proxy_merge.go +++ b/pkg/store/proxy_merge.go @@ -361,7 +361,9 @@ func newLazyRespSet( var rerr error // If timer is already stopped if t != nil && !t.Stop() { - <-t.C // Drain the channel if it was already stopped. + if t.C != nil { + <-t.C // Drain the channel if it was already stopped. + } rerr = errors.Wrapf(err, "failed to receive any data in %s from %s", l.frameTimeout, st) } else { rerr = errors.Wrapf(err, "receive series from %s", st) @@ -614,7 +616,9 @@ func newEagerRespSet( var rerr error // If timer is already stopped if t != nil && !t.Stop() { - <-t.C // Drain the channel if it was already stopped. + if t.C != nil { + <-t.C // Drain the channel if it was already stopped. + } rerr = errors.Wrapf(err, "failed to receive any data in %s from %s", l.frameTimeout, storeName) } else { rerr = errors.Wrapf(err, "receive series from %s", storeName)