改进退出程序时关闭数据库写入

This commit is contained in:
GoEdgeLab
2023-06-23 17:45:39 +08:00
parent 54787a8a8e
commit 67355c85bd
12 changed files with 25 additions and 10 deletions

View File

@@ -27,10 +27,9 @@ func init() {
sharedOCSPTask.Start()
})
})
events.On(events.EventQuit, func() {
events.OnClose(func() {
sharedOCSPTask.Stop()
})
}
// OCSPUpdateTask 更新OCSP任务

View File

@@ -26,7 +26,7 @@ func init() {
sharedSyncAPINodesTask.Start()
})
})
events.On(events.EventQuit, func() {
events.OnClose(func() {
sharedSyncAPINodesTask.Stop()
})
}