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 | 16c4d4cffb6161ee9dd8a008abd2e41a2c8e1c52 (patch) | |
| tree | 2cb4a6f8b23c048fbb328dfd5733d3dbea8799ac /src | |
| parent | 94d35f70d379c8fd8fa8abd31af441c7ab0002eb (diff) | |
| download | rabbitmq-server-git-16c4d4cffb6161ee9dd8a008abd2e41a2c8e1c52.tar.gz | |
remove unnecessary check
Diffstat (limited to 'src')
| -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 6e57ff9fe3..2da6605ecd 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), |
