diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 694abd9e49d4..045cc969afa6 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -329,10 +329,14 @@ handle_other({'$gen_call', From, {info, Items}}, Deb, State) -> catch Error -> {error, Error} end), mainloop(Deb, State); -handle_other({'$gen_cast', force_event_refresh}, Deb, State) -> +handle_other({'$gen_cast', force_event_refresh}, Deb, State) + when ?IS_RUNNING(State) -> rabbit_event:notify(connection_created, [{type, network} | infos(?CREATION_EVENT_KEYS, State)]), mainloop(Deb, State); +handle_other({'$gen_cast', force_event_refresh}, Deb, State) -> + %% Ignore, we will emit a created event once we start running. + mainloop(Deb, State); handle_other(emit_stats, Deb, State) -> mainloop(Deb, emit_stats(State)); handle_other({system, From, Request}, Deb, State = #v1{parent = Parent}) ->