mirror of
https://github.com/Icinga/icingadb.git
synced 2026-06-03 14:00:11 -04:00
history.Sync: Don't operate on closed channel
This commit is contained in:
parent
51e5434374
commit
ce56dffa8f
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue