fix: classical missing count

This commit is contained in:
Skyxim 2022-03-28 21:04:50 +08:00
parent 705311b70e
commit 045dd0589b

View File

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