diff options
| author | Matthias Radestock <matthias@lshift.net> | 2010-03-03 17:18:16 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@lshift.net> | 2010-03-03 17:18:16 +0000 |
| commit | b9c76a0935cd3049b809a9644490c8e8914f00a0 (patch) | |
| tree | 60a4a0cf797e6123c69412a13b1c9797e8512b18 | |
| parent | 34f906ebaeff4389214000dd5b016383cbd44d70 (diff) | |
| download | rabbitmq-server-git-b9c76a0935cd3049b809a9644490c8e8914f00a0.tar.gz | |
cosmetic
| -rw-r--r-- | src/rabbit_channel.erl | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 1bfda6d4b2..0535da7505 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -46,8 +46,7 @@ transaction_id, tx_participants, next_tag, uncommitted_ack_q, unacked_message_q, username, virtual_host, most_recently_declared_queue, - consumer_mapping, blocking - }). + consumer_mapping, blocking}). -define(HIBERNATE_AFTER_MIN, 1000). -define(DESIRED_HIBERNATE, 10000). @@ -349,13 +348,11 @@ queue_blocked(QPid, State = #ch{blocking = Blocking}) -> error -> State; {ok, MRef} -> true = erlang:demonitor(MRef), Blocking1 = dict:erase(QPid, Blocking), - ok = case dict:size(Blocking1) =:= 0 of - true -> - rabbit_writer:send_command( - State#ch.writer_pid, - #'channel.flow_ok'{active = false}); - false -> - ok + ok = case dict:size(Blocking1) of + 0 -> rabbit_writer:send_command( + State#ch.writer_pid, + #'channel.flow_ok'{active = false}); + _ -> ok end, State#ch{blocking = Blocking1} end. @@ -824,9 +821,9 @@ handle_method(#'channel.flow'{active = true}, _, handle_method(#'channel.flow'{active = false}, _, State = #ch{limiter_pid = LimiterPid, consumer_mapping = Consumers}) -> - LimiterPid1 = case LimiterPid =:= undefined of - true -> start_limiter(State); - false -> LimiterPid + LimiterPid1 = case LimiterPid of + undefined -> start_limiter(State); + Other -> Other end, ok = rabbit_limiter:block(LimiterPid1), QPids = consumer_queues(Consumers), |
