v1.5.1 增强程序稳定性

This commit is contained in:
robin
2026-03-22 17:37:40 +08:00
parent afbaaa869c
commit 17e182b413
652 changed files with 22949 additions and 34397 deletions

View File

@@ -22,6 +22,7 @@ type KeyManager struct {
version int64
notifier chan bool
readyCh chan struct{} // 初始加载完成后关闭
}
// NewKeyManager 获取密钥管理器
@@ -31,6 +32,7 @@ func NewKeyManager(db *dbs.DB) *KeyManager {
zoneKeyMap: map[int64]*models.NSKeys{},
db: db,
notifier: make(chan bool, 8),
readyCh: make(chan struct{}),
}
}
@@ -58,6 +60,9 @@ func (this *KeyManager) Start() {
}
}
// 通知初始加载完成
close(this.readyCh)
// 更新
var ticker = time.NewTicker(1 * time.Minute)
for {