summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-09-16 14:00:07 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-09-16 14:00:07 +0100
commit9cdb3ad14fc2ba56d943e432160e8fadd20d4017 (patch)
tree3dc54ea3efd91e9a9180e23ce9ba27c90ec5ad23
parent99821da90e309319bf0442fc9884ca63fe886f09 (diff)
downloadrabbitmq-server-9cdb3ad14fc2ba56d943e432160e8fadd20d4017.tar.gz
minor simplifying refactor
-rw-r--r--src/rabbit_channel.erl13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 36aee755..10697123 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1127,14 +1127,11 @@ handle_method(_MethodRecord, _Content, _State) ->
%%----------------------------------------------------------------------------
monitor_queue(QPid, State = #ch{queue_monitors = QMons}) ->
- case dict:is_key(QPid, QMons) of
- false -> case queue_monitor_needed(QPid, State) of
- false -> State;
- true -> MRef = erlang:monitor(process, QPid),
- State#ch{queue_monitors =
- dict:store(QPid, MRef, QMons)}
- end;
- true -> State
+ case (not dict:is_key(QPid, QMons) andalso
+ queue_monitor_needed(QPid, State)) of
+ true -> MRef = erlang:monitor(process, QPid),
+ State#ch{queue_monitors = dict:store(QPid, MRef, QMons)};
+ false -> State
end.
consumer_monitor(ConsumerTag,