Skip to content

Commit 038cd6a

Browse files
authored
add early return in case of MGET error to avoid panicking (#91)
1 parent f04f97c commit 038cd6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

monitor/redis/watcher.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func (w *Watcher) getValues(ctx context.Context, ch chan<- []*change.Change) {
6868
values, err := w.client.MGet(ctx, w.keys...).Result()
6969
if err != nil {
7070
log.Errorf("failed to MGET keys %v: %v", w.keys, err)
71+
return
7172
}
7273
changes := make([]*change.Change, 0, len(w.keys))
7374

0 commit comments

Comments
 (0)