Skip to content

Commit

Permalink
Merge pull request #725 from Icinga/wrong-number-xdel-args
Browse files Browse the repository at this point in the history
`history.Sync`: Don't operate on closed channel
  • Loading branch information
julianbrost authored Apr 2, 2024
2 parents 51e5434 + ce56dff commit 2826af4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/icingadb/history/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ func (s Sync) deleteFromRedis(ctx context.Context, key string, input <-chan redi
stream := "icinga:history:stream:" + key
for {
select {
case bulk := <-bulks:
case bulk, ok := <-bulks:
if !ok {
return nil
}

ids := make([]string, len(bulk))
for i := range bulk {
ids[i] = bulk[i].ID
Expand Down

0 comments on commit 2826af4

Please sign in to comment.