summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2011-01-19 10:52:53 +0000
committerAlexandru Scvortov <alexandru@rabbitmq.com>2011-01-19 10:52:53 +0000
commit410a95402743cb7d62c4201995ea2631a50b5732 (patch)
treed206a3a70cfdb152a00570a956288af585624b91 /src
parentae4e78b32d7ef089e4588bee4a8a3d7a1ec67b36 (diff)
downloadrabbitmq-server-git-410a95402743cb7d62c4201995ea2631a50b5732.tar.gz
fix break when stats were off
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index ca4243354b..6bbb0412e5 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1265,15 +1265,15 @@ lock_message(false, _MsgStruct, State) ->
State.
send_confirms(State = #ch{confirmed = C, stats_timer = StatsTimer}) ->
+ C1 = lists:append(C),
MsgSeqNos = case rabbit_event:stats_level(StatsTimer) of
- fine -> incr_confirm_exchange_stats(C, State);
- _ -> [MsgSeqNo || {MsgSeqNo, _} <- C]
+ fine -> incr_confirm_exchange_stats(C1, State);
+ _ -> [MsgSeqNo || {MsgSeqNo, _} <- C1]
end,
send_confirms(MsgSeqNos, State #ch{confirmed = []}).
send_confirms([], State) ->
State;
-send_confirms([MsgSeqNo],
- State = #ch{writer_pid = WriterPid}) ->
+send_confirms([MsgSeqNo], State = #ch{writer_pid = WriterPid}) ->
send_confirm(MsgSeqNo, WriterPid),
State;
send_confirms(Cs, State = #ch{writer_pid = WriterPid, unconfirmed = UC}) ->
@@ -1297,7 +1297,7 @@ incr_confirm_exchange_stats(C, State) ->
fun({MsgSeqNo, ExchangeName}, MsgSeqNos0) ->
maybe_incr_stats([{ExchangeName, 1}], confirm, State),
[MsgSeqNo | MsgSeqNos0]
- end, [], lists:append(C)).
+ end, [], C).
send_confirm(SeqNo, WriterPid) ->
ok = rabbit_writer:send_command(WriterPid,