fix painc

This commit is contained in:
lwl0608 2024-05-06 20:25:49 +08:00
parent 2a5192c4e1
commit ef88ac4d14
1 changed files with 8 additions and 8 deletions

View File

@ -1470,14 +1470,14 @@ var ZoneVIPMidMap = map[int64]bool{
}
func IsZoneVIP(mid int64) bool {
cfg := &apollostruct.ZoneVIPConfig{}
_ = apollo.GetJson(consts.ZoneVIPConfigKey, cfg, apollo.ApolloOpts().SetNamespace("zone"))
if util.Int64Contains(cfg.WhiteMids, mid) {
if mid == 161 {
logger.Info("_ZoneVip Apollo, mids: %v", cfg.WhiteMids)
}
return true
}
//cfg := &apollostruct.ZoneVIPConfig{}
//_ = apollo.GetJson(consts.ZoneVIPConfigKey, cfg, apollo.ApolloOpts().SetNamespace("zone"))
//if util.Int64Contains(cfg.WhiteMids, mid) {
// if mid == 161 {
// logger.Info("_ZoneVip Apollo, mids: %v", cfg.WhiteMids)
// }
// return true
//}
return ZoneVIPMidMap[mid]
}