summaryrefslogtreecommitdiff
path: root/src
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
commit999515ba9beb925967f486f1de671f5d35568c0b (patch)
tree3dc54ea3efd91e9a9180e23ce9ba27c90ec5ad23 /src
parent464c9b22caacf24dd7cac51aba887a7a1485abc3 (diff)
downloadrabbitmq-server-git-999515ba9beb925967f486f1de671f5d35568c0b.tar.gz
minor simplifying refactor
Diffstat (limited to 'src')
-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 36aee755a8..10697123db 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,