diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index a9ead06462..a68bd8896a 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1975,12 +1975,12 @@ send_confirms(Cs, Rs, State) -> coalesce_and_send(MsgSeqNos, NegativeMsgSeqNos, MkMsgFun, State = #ch{unconfirmed = UC}) -> SMsgSeqNos = lists:usort(MsgSeqNos), - UnconfirmedCutOff = case dtree:is_empty(UC) of + UnconfirmedCutoff = case dtree:is_empty(UC) of true -> lists:last(SMsgSeqNos) + 1; false -> {SeqNo, _XName} = dtree:smallest(UC), SeqNo end, - CutOff = lists:min([UnconfirmedCutOff | NegativeMsgSeqNos]), - {Ms, Ss} = lists:splitwith(fun(X) -> X < CutOff end, SMsgSeqNos), + Cutoff = erlang:min(UnconfirmedCutoff, NegativeMsgSeqNos), + {Ms, Ss} = lists:splitwith(fun(X) -> X < Cutoff end, SMsgSeqNos), case Ms of [] -> ok; _ -> ok = send(MkMsgFun(lists:last(Ms), true), State) |
