From 8b4e4d68a6a96e015e36ac120abe5897f39e3844 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Wed, 29 Sep 2021 16:51:33 +0200 Subject: [PATCH] History sync: use indefinitely blocking XREAD Just like we do it throughout the rest of the code. --- pkg/icingadb/history/sync.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/icingadb/history/sync.go b/pkg/icingadb/history/sync.go index afa1be3a..0a74211c 100644 --- a/pkg/icingadb/history/sync.go +++ b/pkg/icingadb/history/sync.go @@ -103,14 +103,13 @@ func (s Sync) readFromRedis(ctx context.Context, key string, output chan<- redis xra := &redis.XReadArgs{ Streams: []string{"icinga:history:stream:" + key, "0-0"}, Count: int64(s.redis.Options.XReadCount), - Block: 10 * time.Second, } for { cmd := s.redis.XRead(ctx, xra) streams, err := cmd.Result() - if err != nil && err != redis.Nil { + if err != nil { return icingaredis.WrapCmdErr(cmd) }