改进退出程序时关闭数据库写入
This commit is contained in:
@@ -161,7 +161,7 @@ ON "` + this.itemTableName + `" (
|
||||
this.db = db
|
||||
|
||||
goman.New(func() {
|
||||
events.On(events.EventQuit, func() {
|
||||
events.OnClose(func() {
|
||||
_ = this.Close()
|
||||
this.cleanTicker.Stop()
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
SharedIPListManager.Start()
|
||||
})
|
||||
})
|
||||
events.On(events.EventQuit, func() {
|
||||
events.OnClose(func() {
|
||||
SharedIPListManager.Stop()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user