diff --git a/lib/fluent/event_router.rb b/lib/fluent/event_router.rb index 9a133b5c6b..bfc192ff0a 100644 --- a/lib/fluent/event_router.rb +++ b/lib/fluent/event_router.rb @@ -286,7 +286,7 @@ def reset_optimization def find(tag) pipeline = nil - @match_rules.each_with_index { |rule, i| + @match_rules.each do |rule| if rule.match?(tag) if rule.collector.is_a?(Plugin::Filter) pipeline ||= Pipeline.new @@ -301,7 +301,7 @@ def find(tag) return pipeline end end - } + end if pipeline # filter is matched but no match