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 { if !shouldResolveIP {
shouldResolveIP = shouldResolveIP || r.ShouldResolveIP() shouldResolveIP = shouldResolveIP || r.ShouldResolveIP()
} }
classicalRules = append(classicalRules, r) classicalRules = append(classicalRules, r)
c.count++
}
} }
c.rules = classicalRules c.rules = classicalRules