mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 20:50:06 +00:00
🐛 修复SSL证书变动状态更新
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
pb "github.com/naiba/nezha/proto"
|
||||
)
|
||||
|
||||
var Version = "v0.7.3" // !!记得修改 README 中的 badge 版本!!
|
||||
var Version = "v0.7.4" // !!记得修改 README 中的 badge 版本!!
|
||||
|
||||
const (
|
||||
SnapshotDelay = 3
|
||||
|
||||
@@ -318,6 +318,7 @@ func (ss *ServiceSentinel) worker() {
|
||||
expiresOld, _ = time.Parse("2006-01-02 15:04:05 -0700 MST", oldCert[1])
|
||||
}
|
||||
if oldCert[0] != newCert[0] && !expiresNew.Equal(expiresOld) {
|
||||
ss.sslCertCache[mh.MonitorID] = mh.Data
|
||||
errMsg = fmt.Sprintf(
|
||||
"SSL证书变更,旧:%s, %s 过期;新:%s, %s 过期。",
|
||||
oldCert[0], expiresOld.Format("2006-01-02 15:04:05"), newCert[0], expiresNew.Format("2006-01-02 15:04:05"))
|
||||
|
||||
Reference in New Issue
Block a user