]> source.dussan.org Git - gitea.git/commit
Prevent race in PersistableChannelUniqueQueue.Has (#14651)
authorzeripath <art27@cantab.net>
Sat, 13 Feb 2021 19:02:09 +0000 (19:02 +0000)
committerGitHub <noreply@github.com>
Sat, 13 Feb 2021 19:02:09 +0000 (20:02 +0100)
commitb3c2e23cbbfc6386f0d35e252051f9f74f548f98
treeaf38d1bb992c1bb34920805f7efb7317b12ff085
parent5e4fa7c703726cfc18ce8741a5d829173f3fec5c
Prevent race in PersistableChannelUniqueQueue.Has (#14651)

There is potentially a race with a slow starting internal
queue causing a NPE if Has is checked before the internal
queue has been setup.

This PR adds a lock on the Has() fn.

Fix #14311

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/queue/unique_queue_disk_channel.go