diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-06-10 16:41:55 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-06-10 16:41:55 +0100 |
commit | 7950556ca268a12f6d9cd747c568761d1e9958a4 (patch) | |
tree | 370f2856eeea1ad1a50bf4e804f22f4965a68810 | |
parent | 745c703514a9388cd034920f4c33f9e503928fb5 (diff) | |
download | rabbitmq-server-7950556ca268a12f6d9cd747c568761d1e9958a4.tar.gz |
Init the stats timer again on force_event_refresh, so that if stats have become enabled we do the right thing.
-rw-r--r-- | src/rabbit_amqqueue_process.erl | 2 | ||||
-rw-r--r-- | src/rabbit_channel.erl | 2 | ||||
-rw-r--r-- | src/rabbit_reader.erl | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 753d8e15..97206df3 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -1165,7 +1165,7 @@ handle_cast({force_event_refresh, Ref}, emit_consumer_created( Ch, CTag, true, AckRequired, QName, Prefetch, Args, Ref) end, - noreply(State); + noreply(rabbit_event:init_stats_timer(State, #q.stats_timer)); handle_cast(notify_decorators, State) -> notify_decorators(State), diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 74f9cacf..15944270 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -341,7 +341,7 @@ handle_cast({send_drained, CTagCredit}, State = #ch{writer_pid = WriterPid}) -> handle_cast({force_event_refresh, Ref}, State) -> rabbit_event:notify(channel_created, infos(?CREATION_EVENT_KEYS, State), Ref), - noreply(State); + noreply(rabbit_event:init_stats_timer(State, #ch.stats_timer)); handle_cast({mandatory_received, MsgSeqNo}, State = #ch{mandatory = Mand}) -> %% NB: don't call noreply/1 since we don't want to send confirms. diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index ddaf205e..906c4b6e 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -410,7 +410,7 @@ handle_other({'$gen_cast', {force_event_refresh, Ref}}, State) rabbit_event:notify( connection_created, [{type, network} | infos(?CREATION_EVENT_KEYS, State)], Ref), - State; + rabbit_event:init_stats_timer(State, #v1.stats_timer); handle_other({'$gen_cast', force_event_refresh}, State) -> %% Ignore, we will emit a created event once we start running. State; |