diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-09-15 14:41:49 +0100 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-09-15 14:41:49 +0100 |
commit | 3a6381d2d1c79542f61d96b3c86d20b691bff514 (patch) | |
tree | 2cb4a6f8b23c048fbb328dfd5733d3dbea8799ac | |
parent | 4538e4023a2c9e3e5a7aeccf2135be93d025afb1 (diff) | |
download | rabbitmq-server-3a6381d2d1c79542f61d96b3c86d20b691bff514.tar.gz |
remove unnecessary check
-rw-r--r-- | src/rabbit_channel.erl | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 6e57ff9f..2da6605e 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -325,15 +325,11 @@ handle_info(emit_stats, State = #ch{stats_timer = StatsTimer}) -> noreply([ensure_stats_timer], State#ch{stats_timer = rabbit_event:reset_stats_timer(StatsTimer)}); -handle_info({'DOWN', _MRef, process, QPid, Reason}, - State = #ch{consumer_monitors = ConsumerMonitors}) -> +handle_info({'DOWN', _MRef, process, QPid, Reason}, State) -> State1 = handle_publishing_queue_down(QPid, Reason, State), erase_queue_stats(QPid), State2 = queue_blocked(QPid, State1), - State3 = case dict:is_key(QPid, ConsumerMonitors) of - false -> State2; - true -> handle_consuming_queue_down(QPid, State1) - end, + State3 = handle_consuming_queue_down(QPid, State2), noreply(State3#ch{queue_monitors = dict:erase(QPid, State3#ch.queue_monitors)}); @@ -1213,7 +1209,7 @@ handle_consuming_queue_down(QPid, consumer_monitors = ConsumerMonitors, writer_pid = WriterPid}) -> ConsumerTags = case dict:find(QPid, ConsumerMonitors) of - error -> []; + error -> gb_sets:new(); {ok, CTags} -> CTags end, ConsumerMonitors1 = dict:erase(QPid, ConsumerMonitors), |