diff options
| author | Daniil Fedotov <hairyhum@gmail.com> | 2018-10-02 15:30:53 +0100 |
|---|---|---|
| committer | Daniil Fedotov <hairyhum@gmail.com> | 2018-10-02 15:30:53 +0100 |
| commit | 4e2dc488a74cb73f0edede65c0d9d2dbeca28971 (patch) | |
| tree | 4d2a3aeb951800cef8b8e7d5398584175b75df01 | |
| parent | 25801d7d49c4253ced504baa6c3738cdaa2a2d35 (diff) | |
| download | rabbitmq-server-git-4e2dc488a74cb73f0edede65c0d9d2dbeca28971.tar.gz | |
Fix min function to lists:min instead of erlang:min.
The cutoff value should be a number, corresponding to the minimal
uncommitted or rejected message (or confirmed if sending rejects).
erlang:min compares term values and will not traverse a list of
NegativeMsgSeqNos.
| -rw-r--r-- | src/rabbit_channel.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index a68bd8896a..f35a5a6d80 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1979,7 +1979,7 @@ coalesce_and_send(MsgSeqNos, NegativeMsgSeqNos, MkMsgFun, State = #ch{unconfirme true -> lists:last(SMsgSeqNos) + 1; false -> {SeqNo, _XName} = dtree:smallest(UC), SeqNo end, - Cutoff = erlang:min(UnconfirmedCutoff, NegativeMsgSeqNos), + Cutoff = lists:min([UnconfirmedCutoff | NegativeMsgSeqNos]), {Ms, Ss} = lists:splitwith(fun(X) -> X < Cutoff end, SMsgSeqNos), case Ms of [] -> ok; |
