Skip to content

Commit a191c23

Browse files
Copilotfiftin
andcommitted
Fix critical mutex lock/unlock order bug in SchedulePool.Destroy()
Co-authored-by: fiftin <[email protected]>
1 parent aa16e4c commit a191c23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/schedules/SchedulePool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ func (p *SchedulePool) clear() {
195195
}
196196

197197
func (p *SchedulePool) Destroy() {
198-
defer p.locker.Unlock()
199198
p.locker.Lock()
199+
defer p.locker.Unlock()
200200
p.cron.Stop()
201201
p.clear()
202202
p.cron = nil

0 commit comments

Comments
 (0)