fix: classical missing count

This commit is contained in:
gVisor bot 2022-03-28 21:04:50 +08:00
parent e56db322fd
commit ee3ad3d898

View File

@ -37,13 +37,14 @@ func (c *classicalStrategy) OnUpdate(rules []string) {
r, err := parseRule(ruleType, rule, "", params) r, err := parseRule(ruleType, rule, "", params)
if err != nil { if err != nil {
log.Warnln("parse rule error:[%s]", err.Error()) log.Warnln("parse rule error:[%s]", err.Error())
} } else {
if !shouldResolveIP {
shouldResolveIP = shouldResolveIP || r.ShouldResolveIP()
}
if !shouldResolveIP { classicalRules = append(classicalRules, r)
shouldResolveIP = shouldResolveIP || r.ShouldResolveIP() c.count++
} }
classicalRules = append(classicalRules, r)
} }
c.rules = classicalRules c.rules = classicalRules