Fix rule-set not closed

This commit is contained in:
世界 2025-02-01 19:42:32 +08:00
parent 27c31eac5d
commit 9b4c11ba95
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 8 additions and 1 deletions

View file

@ -484,6 +484,13 @@ func (r *Router) Close() error {
})
monitor.Finish()
}
for i, ruleSet := range r.ruleSets {
monitor.Start("close rule-set[", i, "]")
err = E.Append(err, ruleSet.Close(), func(err error) error {
return E.Cause(err, "close rule-set[", i, "]")
})
monitor.Finish()
}
return err
}