diff options
Diffstat (limited to 'modules/queue/queue_channel.go')
-rw-r--r-- | modules/queue/queue_channel.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/queue/queue_channel.go b/modules/queue/queue_channel.go index 105388f421..5469c03100 100644 --- a/modules/queue/queue_channel.go +++ b/modules/queue/queue_channel.go @@ -117,7 +117,10 @@ func (q *ChannelQueue) FlushWithContext(ctx context.Context) error { select { case <-paused: return nil - case data := <-q.dataChan: + case data, ok := <-q.dataChan: + if !ok { + return nil + } if unhandled := q.handle(data); unhandled != nil { log.Error("Unhandled Data whilst flushing queue %d", q.qid) } |