]> source.dussan.org Git - gitea.git/commit
Prevent race in PersistableChannelUniqueQueue.Has (#14651) (#14676)
authorzeripath <art27@cantab.net>
Sun, 14 Feb 2021 00:50:50 +0000 (00:50 +0000)
committerGitHub <noreply@github.com>
Sun, 14 Feb 2021 00:50:50 +0000 (01:50 +0100)
commitf305cffcaf61ecfba7d5e6c28492ca640da1c98d
treeaa4ec6f646358f6beb83575a759bf1b3e6b3268a
parentc0320065b67439f1c87130a3fcd2f821fc7722bd
Prevent race in PersistableChannelUniqueQueue.Has (#14651) (#14676)

Backport #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>
Co-authored-by: 6543 <6543@obermui.de>
modules/queue/unique_queue_disk_channel.go