summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-02-21 18:15:44 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-02-21 18:15:44 +0000
commitbb9d2725ae586f40a6868b6af7ba4980e2ae3725 (patch)
tree8ae8330069b2747abf464f50006bb3802b12521e
parentbe8cb807748f28021d38c62f158f095874d9d607 (diff)
downloadrabbitmq-server-bb9d2725ae586f40a6868b6af7ba4980e2ae3725.tar.gz
cosmetic and code movement
-rw-r--r--src/rabbit_channel.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 28f3673d..fe6522fe 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -298,10 +298,8 @@ handle_info({'DOWN', MRef, process, QPid, Reason},
State = #ch{consumer_monitors = ConsumerMonitors}) ->
noreply(
case dict:find(MRef, ConsumerMonitors) of
- error ->
- handle_queue_down(QPid, Reason, State);
- {ok, ConsumerTag} ->
- handle_consumer_down(MRef, ConsumerTag, State)
+ error -> handle_queue_down(QPid, Reason, State);
+ {ok, ConsumerTag} -> handle_consumer_down(MRef, ConsumerTag, State)
end).
handle_pre_hibernate(State = #ch{stats_timer = StatsTimer}) ->
@@ -1091,11 +1089,11 @@ handle_method(_MethodRecord, _Content, _State) ->
monitor_consumer(ConsumerTag, State = #ch{consumer_mapping = ConsumerMapping,
consumer_monitors = ConsumerMonitors,
capabilities = Capabilities}) ->
- {#amqqueue{pid = QPid} = Q, undefined} = dict:fetch(ConsumerTag,
- ConsumerMapping),
case rabbit_misc:table_lookup(
Capabilities, <<"consumer_cancel_notify">>) of
{bool, true} ->
+ {#amqqueue{pid = QPid} = Q, undefined} =
+ dict:fetch(ConsumerTag, ConsumerMapping),
MRef = erlang:monitor(process, QPid),
State#ch{consumer_mapping =
dict:store(ConsumerTag, {Q, MRef}, ConsumerMapping),