Skip to content

Commit

Permalink
add ability to get root-router
Browse files Browse the repository at this point in the history
  • Loading branch information
ferbar committed Apr 28, 2021
1 parent 2cbb650 commit 9e1819f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fluent/plugin_helper/event_emitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ def event_emitter_used_actually?

def event_emitter_router(label_name)
if label_name
Engine.root_agent.find_label(label_name).event_router
if label_name == ""
Engine.root_agent.event_router
else
Engine.root_agent.find_label(label_name).event_router
end
elsif self.respond_to?(:as_secondary) && self.as_secondary
if @primary_instance.has_router?
@_event_emitter_lazy_init = true
Expand Down

0 comments on commit 9e1819f

Please sign in to comment.