aboutsummaryrefslogtreecommitdiffstats
path: root/modules/queue
diff options
context:
space:
mode:
Diffstat (limited to 'modules/queue')
-rw-r--r--modules/queue/unique_queue_disk_channel.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/queue/unique_queue_disk_channel.go b/modules/queue/unique_queue_disk_channel.go
index 71049f3259..4a69b43eae 100644
--- a/modules/queue/unique_queue_disk_channel.go
+++ b/modules/queue/unique_queue_disk_channel.go
@@ -149,6 +149,11 @@ func (q *PersistableChannelUniqueQueue) Has(data Data) (bool, error) {
if err != nil || has {
return has, err
}
+ q.lock.Lock()
+ defer q.lock.Unlock()
+ if q.internal == nil {
+ return false, nil
+ }
return q.internal.(UniqueQueue).Has(data)
}