Fix nested rule-set match cache isolation

This commit is contained in:
世界
2026-03-23 12:26:19 +08:00
parent fbb51d2cae
commit 8bf01b7add
4 changed files with 15 additions and 5 deletions

View File

@@ -323,7 +323,9 @@ func (s *RemoteRuleSet) Close() error {
func (s *RemoteRuleSet) Match(metadata *adapter.InboundContext) bool {
for _, rule := range s.rules {
if rule.Match(metadata) {
nestedMetadata := *metadata
nestedMetadata.ResetRuleMatchCache()
if rule.Match(&nestedMetadata) {
return true
}
}