diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2012-11-15 13:04:30 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-11-15 13:04:30 +0000 |
commit | 24e4abdbabcd2e47c219d1f5e554214517601f60 (patch) | |
tree | 8416068aa92baa17d9f733a974aa80db7d1a238b | |
parent | 563ef0ee5e839b4c1b5567bd8bc2f00e8e1b6b43 (diff) | |
download | rabbitmq-server-24e4abdbabcd2e47c219d1f5e554214517601f60.tar.gz |
inline
-rw-r--r-- | src/rabbit_channel.erl | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index a94d2ab5..53610e6d 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1242,7 +1242,10 @@ record_sent(ConsumerTag, AckRequired, {_ , true} -> deliver; {_ , false} -> deliver_no_ack end, State), - maybe_incr_redeliver_stats(Redelivered, QPid, State), + case Redelivered of + true -> maybe_incr_stats([{QPid, 1}], redeliver, State); + false -> ok + end, rabbit_trace:tap_trace_out(Msg, TraceState), UAMQ1 = case AckRequired of true -> queue:in({DeliveryTag, ConsumerTag, {QPid, MsgId}}, @@ -1462,11 +1465,6 @@ i(Item, _) -> name(#ch{conn_name = ConnName, channel = Channel}) -> list_to_binary(rabbit_misc:format("~s (~p)", [ConnName, Channel])). -maybe_incr_redeliver_stats(true, QPid, State) -> - maybe_incr_stats([{QPid, 1}], redeliver, State); -maybe_incr_redeliver_stats(_, _, _State) -> - ok. - maybe_incr_stats(QXIncs, Measure, State) -> case rabbit_event:stats_level(State, #ch.stats_timer) of fine -> [incr_stats(QX, Inc, Measure) || {QX, Inc} <- QXIncs]; |