修复crontab定时器释放不完整问题

This commit is contained in:
duanhf2012
2020-04-29 17:33:19 +08:00
parent 272412fc8f
commit 2afa611ef5
2 changed files with 1 additions and 2 deletions

View File

@@ -194,7 +194,6 @@ func (slf *Module) CronFunc(cronExpr *timer.CronExpr, cb func()) *timer.Cron {
cron := slf.dispatcher.CronFuncEx(cronExpr, func(cron *timer.Cron) {
cb()
delete(slf.mapActiveCron,cron)
})
slf.mapActiveCron[cron] = nil

View File

@@ -48,7 +48,7 @@ func (t *Timer) Cb() {
if t.cbex!=nil {
t.cbex(t)
}else{
}else if t.cb!= nil {
t.cb()
}