diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 4 | ||||
| -rw-r--r-- | src/rabbit_limiter.erl | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index b53511dde5..fb3896bd3b 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -59,7 +59,7 @@ messages_unacknowledged, acks_uncommitted, prefetch_count, - blocked_channelflow]). + client_flow_blocked]). -define(CREATION_EVENT_KEYS, [pid, @@ -1126,7 +1126,7 @@ i(acks_uncommitted, #ch{uncommitted_ack_q = UAQ}) -> queue:len(UAQ); i(prefetch_count, #ch{limiter_pid = LimiterPid}) -> rabbit_limiter:get_limit(LimiterPid); -i(blocked_channelflow, #ch{limiter_pid = LimiterPid}) -> +i(client_flow_blocked, #ch{limiter_pid = LimiterPid}) -> rabbit_limiter:is_blocked(LimiterPid); i(Item, _) -> throw({bad_argument, Item}). diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl index 177b0bb91b..be1dcad1a6 100644 --- a/src/rabbit_limiter.erl +++ b/src/rabbit_limiter.erl @@ -165,8 +165,8 @@ handle_call(unblock, _From, State) -> {stop, State1} -> {stop, normal, stopped, State1} end; -handle_call(is_blocked, _From, State = #lim{blocked = Blocked}) -> - {reply, Blocked, State}. +handle_call(is_blocked, _From, State) -> + {reply, blocked(State), State}. handle_cast({ack, Count}, State = #lim{volume = Volume}) -> NewVolume = if Volume == 0 -> 0; @@ -195,8 +195,8 @@ code_change(_, State, _) -> %%---------------------------------------------------------------------------- maybe_notify(OldState, NewState) -> - case (limit_reached(OldState) orelse internal_is_blocked(OldState)) andalso - not (limit_reached(NewState) orelse internal_is_blocked(NewState)) of + case (limit_reached(OldState) orelse blocked(OldState)) andalso + not (limit_reached(NewState) orelse blocked(NewState)) of true -> NewState1 = notify_queues(NewState), {case NewState1#lim.prefetch_count of 0 -> stop; @@ -208,7 +208,7 @@ maybe_notify(OldState, NewState) -> limit_reached(#lim{prefetch_count = Limit, volume = Volume}) -> Limit =/= 0 andalso Volume >= Limit. -internal_is_blocked(#lim{blocked = Blocked}) -> Blocked. +blocked(#lim{blocked = Blocked}) -> Blocked. remember_queue(QPid, State = #lim{queues = Queues}) -> case dict:is_key(QPid, Queues) of |
