🐛 fix: manager timer panic

This commit is contained in:
fumiama 2022-01-15 15:41:27 +08:00
parent 89bdc1e496
commit 173fd250cb

View File

@ -39,10 +39,10 @@ var (
// NewClock 添加一个新时钟
func NewClock(db *sql.Sqlite) (c Clock) {
c.loadTimers(db)
c.cron = cron.New()
c.entries = make(map[uint32]cron.EntryID)
c.timers = &map[uint32]*Timer{}
c.loadTimers(db)
c.cron.Start()
return
}