diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-12-02 21:00:30 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-12-02 21:00:30 +0000 |
| commit | 679e90cceeda40de209b1de77f4d056cca4e7f9d (patch) | |
| tree | d7682acc8a589de44701ad0b9933e8ebc9cb61b6 /src | |
| parent | c3476627f15ad4107485fed5bd9ac36d1d22a556 (diff) | |
| download | rabbitmq-server-git-679e90cceeda40de209b1de77f4d056cca4e7f9d.tar.gz | |
cosmetic
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index f7b875a0e8..3d12004628 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -460,20 +460,19 @@ send_or_enqueue_ack(undefined, _QPid, State) -> send_or_enqueue_ack(_MsgSeqNo, _QPid, State = #ch{confirm_enabled = false}) -> State; send_or_enqueue_ack(MsgSeqNo, QPid, State = #ch{confirm_multiple = false}) -> - do_if_unconfirmed( - MsgSeqNo, QPid, - fun(MSN, State1 = #ch{writer_pid = WriterPid}) -> - ok = rabbit_writer:send_command( - WriterPid, #'basic.ack'{delivery_tag = MSN}), - State1 - end, State); + do_if_unconfirmed(MsgSeqNo, QPid, + fun(MSN, State1 = #ch{writer_pid = WriterPid}) -> + ok = rabbit_writer:send_command( + WriterPid, #'basic.ack'{ + delivery_tag = MSN}), + State1 + end, State); send_or_enqueue_ack(MsgSeqNo, QPid, State = #ch{confirm_multiple = true}) -> - do_if_unconfirmed( - MsgSeqNo, QPid, - fun(MSN, State1 = #ch{held_confirms = As}) -> - start_confirm_timer( - State1#ch{held_confirms = gb_sets:add(MSN, As)}) - end, State). + do_if_unconfirmed(MsgSeqNo, QPid, + fun(MSN, State1 = #ch{held_confirms = As}) -> + start_confirm_timer( + State1#ch{held_confirms = gb_sets:add(MSN, As)}) + end, State). do_if_unconfirmed(MsgSeqNo, QPid, ConfirmFun, State = #ch{unconfirmed = UC, @@ -484,9 +483,8 @@ do_if_unconfirmed(MsgSeqNo, QPid, ConfirmFun, Unconfirmed1 = gb_sets:delete(MsgSeqNo, UC), case QPid of undefined -> - ConfirmFun(MsgSeqNo, - State#ch{unconfirmed = Unconfirmed1}); - _ -> + ConfirmFun(MsgSeqNo, State#ch{unconfirmed = Unconfirmed1}); + _ -> {ok, Qs} = dict:find(MsgSeqNo, QFM), Qs1 = sets:del_element(QPid, Qs), case sets:size(Qs1) of @@ -499,7 +497,8 @@ do_if_unconfirmed(MsgSeqNo, QPid, ConfirmFun, dict:store(MsgSeqNo, Qs1, QFM)} end end; - false -> State + false -> + State end. handle_method(#'channel.open'{}, _, State = #ch{state = starting}) -> |
