🚸 improve: 优化agent取双栈IP、服务状态页面展示策略

This commit is contained in:
naiba
2021-01-16 11:23:42 +08:00
parent a41c792577
commit 345511e90f
7 changed files with 75 additions and 17 deletions

View File

@@ -87,7 +87,8 @@ func (s *NezhaHandler) ReportSystemInfo(c context.Context, r *pb.Host) (*pb.Rece
host := model.PB2Host(r)
dao.ServerLock.RLock()
defer dao.ServerLock.RUnlock()
if dao.ServerList[clientID].Host != nil &&
if dao.Conf.EnableIPChangeNotification &&
dao.ServerList[clientID].Host != nil &&
dao.ServerList[clientID].Host.IP != "" &&
host.IP != "" &&
dao.ServerList[clientID].Host.IP != host.IP {