diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2014-01-22 23:25:27 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2014-01-22 23:25:27 +0000 |
| commit | 07a1bab90e0d4cbc9da8e532f1ec10cf2832c055 (patch) | |
| tree | be49bd1d49e7187d2fffa4d5a108579f626d13df /src | |
| parent | 8d32aad6f2d4a3c668bb77dcd92be59636fcbdde (diff) | |
| download | rabbitmq-server-git-07a1bab90e0d4cbc9da8e532f1ec10cf2832c055.tar.gz | |
some drive-by inlining
not strictly part of this bug but easier here than on default
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 1da4b0fd5c..45868cebfa 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -352,9 +352,10 @@ handle_cast({mandatory_received, MsgSeqNo}, State = #ch{mandatory = Mand}) -> %% NB: don't call noreply/1 since we don't want to send confirms. noreply_coalesce(State#ch{mandatory = dtree:drop(MsgSeqNo, Mand)}); -handle_cast({confirm, MsgSeqNos, From}, State) -> +handle_cast({confirm, MsgSeqNos, QPid}, State = #ch{unconfirmed = UC}) -> + {MXs, UC1} = dtree:take(MsgSeqNos, QPid, UC), %% NB: don't call noreply/1 since we don't want to send confirms. - noreply_coalesce(confirm(MsgSeqNos, From, State)). + noreply_coalesce(record_confirms(MXs, State#ch{unconfirmed = UC1})). handle_info({bump_credit, Msg}, State) -> credit_flow:handle_bump_msg(Msg), @@ -625,12 +626,6 @@ record_confirms([], State) -> record_confirms(MXs, State = #ch{confirmed = C}) -> State#ch{confirmed = [MXs | C]}. -confirm([], _QPid, State) -> - State; -confirm(MsgSeqNos, QPid, State = #ch{unconfirmed = UC}) -> - {MXs, UC1} = dtree:take(MsgSeqNos, QPid, UC), - record_confirms(MXs, State#ch{unconfirmed = UC1}). - handle_method(#'channel.open'{}, _, State = #ch{state = starting}) -> %% Don't leave "starting" as the state for 5s. TODO is this TRTTD? State1 = State#ch{state = running}, |
