diff options
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 12 | ||||
| -rw-r--r-- | src/rabbit_limiter.erl | 3 | ||||
| -rw-r--r-- | src/rabbit_reader.erl | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 47bc1641b9..66b6338614 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -1354,14 +1354,12 @@ handle_cast(stop_mirroring, State = #q{backing_queue = BQ, handle_cast({inform_limiter, ChPid, Msg}, State = #q{backing_queue = BQ, backing_queue_state = BQS}) -> - #cr{limiter = Limiter, - blocked_ctags = BCTags} = ch_record(ChPid), - {Unblock, Limiter2} = - rabbit_limiter:inform(Limiter, ChPid, BQ:len(BQS), Msg), + #cr{limiter = Lim, + blocked_ctags = BCTags} = ch_record(ChPid), + {Unblock, Lim2} = rabbit_limiter:inform(Lim, ChPid, BQ:len(BQS), Msg), noreply(possibly_unblock( - State, ChPid, - fun(C) -> C#cr{blocked_ctags = BCTags -- Unblock, - limiter = Limiter2} end)); + State, ChPid, fun(C) -> C#cr{blocked_ctags = BCTags -- Unblock, + limiter = Lim2} end)); handle_cast(wake_up, State) -> noreply(State). diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl index 900fbec37a..3cdb684987 100644 --- a/src/rabbit_limiter.erl +++ b/src/rabbit_limiter.erl @@ -72,6 +72,9 @@ blocked = false, queues = orddict:new(), % QPid -> {MonitorRef, Notify} volume = 0}). +%% 'Notify' is a boolean that indicates whether a queue should be +%% notified of a change in the limit or volume that may allow it to +%% deliver more messages via the limiter's channel. -record(credit, {count = 0, credit = 0, drain = false}). diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index f140bd237c..fefff6b21a 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -690,7 +690,7 @@ handle_input(handshake, <<"AMQP", 1, 1, 9, 1>>, State) -> start_connection({8, 0, 0}, rabbit_framing_amqp_0_8, State); %% ... and finally, the 1.0 spec is crystal clear! Note that the -%% FIXME TLS uses a different protocol number, and would go here. +%% TLS uses a different protocol number, and would go here. handle_input(handshake, <<"AMQP", 0, 1, 0, 0>>, State) -> become_1_0(amqp, [0, 1, 0, 0], State); |
