summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2010-08-18 16:43:33 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2010-08-18 16:43:33 +0100
commitbc72dcabf49e3ecd43bb36a6d9641decfc630672 (patch)
tree6ab0ca51831b34b6e99d74330fdf67e358ec10fa /src
parent638b2b41aca863203266b5db559199b75abd7a58 (diff)
downloadrabbitmq-server-git-bc72dcabf49e3ecd43bb36a6d9641decfc630672.tar.gz
fixed a small empty-set bug
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 76b962fb57..f305194ab1 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -262,11 +262,12 @@ handle_cast(multiple_ack_flush,
State = #ch{writer_pid = WriterPid,
held_confirms = As,
need_confirming = NA}) ->
- rabbit_log:info("channel got a multiple_ack_flush message~n"
- "held acks: ~p~n", [gb_sets:to_list(As)]),
case gb_sets:is_empty(As) of
true -> ok; % this should never be the case
- false -> flush_multiple(As, WriterPid, gb_sets:smallest(NA))
+ false -> flush_multiple(As, WriterPid, case gb_sets:is_empty(NA) of
+ false -> gb_sets:smallest(NA);
+ true -> gb_sets:largest(As)+1
+ end)
end,
{noreply, State #ch { held_confirms = gb_sets:new(),
confirm_tref = undefined }};
@@ -447,7 +448,6 @@ send_or_enqueue_ack(_, State = #ch{confirm_enabled = false}) ->
State;
send_or_enqueue_ack(MsgSeqNo,
State = #ch{confirm_multiple = false}) ->
- rabbit_log:info("handling confirm in single mode (#~p)~n", [MsgSeqNo]),
do_if_not_dup(MsgSeqNo, State,
fun(MSN, S = #ch{writer_pid = WriterPid,
qpid_to_msgs = QTM}) ->
@@ -459,7 +459,6 @@ send_or_enqueue_ack(MsgSeqNo,
end, QTM) }
end);
send_or_enqueue_ack(MsgSeqNo, State = #ch{confirm_multiple = true}) ->
- rabbit_log:info("handling confirm in multiple mode (#~p)~n", [MsgSeqNo]),
do_if_not_dup(MsgSeqNo, State,
fun(MSN, S = #ch{qpid_to_msgs = QTM}) ->
State1 = start_ack_timer(S),