Skip to content

Commit

Permalink
🐛 fix: 修复一直报警SSL证书问题
Browse files Browse the repository at this point in the history
  • Loading branch information
naiba committed Jan 16, 2021
1 parent 4b6740e commit cb20758
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,12 @@ URL 里面也可放置占位符,请求时会进行简单的字符串替换。

## 变更日志

`dashboard 0.2.2` `agent 0.2.2`

- `dashboard 0.2.2`

- 修复一直报警SSL证书问题

- `agent 0.2.2`

- 修复双栈IP只能获取到v6的问题 #61
Expand Down
2 changes: 1 addition & 1 deletion service/dao/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ var SortedServerList []*model.Server

var ServerLock sync.RWMutex

var Version = "v0.2.1"
var Version = "v0.2.2"

func ReSortServer() {
SortedServerList = []*model.Server{}
Expand Down
3 changes: 2 additions & 1 deletion service/rpc/nezha.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ func (s *NezhaHandler) ReportTask(c context.Context, r *pb.TaskResult) (*pb.Rece
// 证书错误提醒
errMsg = r.GetData()
} else {
var oldSSLCert = strings.Split(last.Data, "|")
var splits = strings.Split(r.GetData(), "|")
// 证书变更提醒
if last.Data != "" && last.Data != splits[0] {
if last.Data != "" && oldSSLCert[0] != splits[0] {
errMsg = fmt.Sprintf(
"SSL证书变更,旧:%s,新:%s。",
last.Data, splits[0])
Expand Down

0 comments on commit cb20758

Please sign in to comment.