diff options
| -rw-r--r-- | src/rabbit_channel.erl | 8 | ||||
| -rw-r--r-- | src/rabbit_limiter.erl | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 0535da7505..314ca82697 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -829,10 +829,10 @@ handle_method(#'channel.flow'{active = false}, _, QPids = consumer_queues(Consumers), Queues = [{QPid, erlang:monitor(process, QPid)} || QPid <- QPids], ok = rabbit_amqqueue:flush_all(QPids, self()), - case Queues =:= [] of - true -> {reply, #'channel.flow_ok'{active = false}, State}; - false -> {noreply, State#ch{limiter_pid = LimiterPid1, - blocking = dict:from_list(Queues)}} + case Queues of + [] -> {reply, #'channel.flow_ok'{active = false}, State}; + _ -> {noreply, State#ch{limiter_pid = LimiterPid1, + blocking = dict:from_list(Queues)}} end; handle_method(#'channel.flow_ok'{active = _}, _, State) -> diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl index 4cb8725b0a..252ba0011a 100644 --- a/src/rabbit_limiter.erl +++ b/src/rabbit_limiter.erl @@ -197,9 +197,9 @@ maybe_notify(OldState, NewState) -> case (limit_reached(OldState) orelse is_blocked(OldState)) andalso not (limit_reached(NewState) orelse is_blocked(NewState)) of true -> NewState1 = notify_queues(NewState), - {case NewState1#lim.prefetch_count == 0 of - true -> stop; - false -> cont + {case NewState1#lim.prefetch_count of + 0 -> stop; + _ -> cont end, NewState1}; false -> {cont, NewState} end. |
