mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-14 20:53:53 +09:00
move unlocking out of setInternal
This commit is contained in:
@ -122,7 +122,12 @@ func (p *PersistableChannelQueue) Push(data Data) error {
|
||||
func (p *PersistableChannelQueue) Run(atShutdown, atTerminate func(context.Context, func())) {
|
||||
p.lock.Lock()
|
||||
if p.internal == nil {
|
||||
p.setInternal(atShutdown, p.ChannelQueue.pool.handle, p.exemplar)
|
||||
err := p.setInternal(atShutdown, p.ChannelQueue.pool.handle, p.exemplar)
|
||||
p.lock.Unlock()
|
||||
if err != nil {
|
||||
log.Fatal("Unable to create internal queue for %s Error: %v", p.Name(), err)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
p.lock.Unlock()
|
||||
}
|
||||
|
Reference in New Issue
Block a user