mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-07 00:05:49 +08:00
改进退出程序时关闭数据库写入
This commit is contained in:
@@ -30,7 +30,7 @@ type DB struct {
|
||||
func NewDB(path string) *DB {
|
||||
var db = &DB{path: path}
|
||||
|
||||
events.On(events.EventQuit, func() {
|
||||
events.OnClose(func() {
|
||||
_ = db.Close()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user