diff options
| author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-09-15 13:54:18 +0100 |
|---|---|---|
| committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2011-09-15 13:54:18 +0100 |
| commit | eaedf1fc10f2c754657e337a151102e2257ccc06 (patch) | |
| tree | a73aaf7ab6ca0b9226dfd05d4de77a1c0f7c115e /src | |
| parent | fc287cc3f3687ea2a0a6cf532313a0309a781905 (diff) | |
| download | rabbitmq-server-git-eaedf1fc10f2c754657e337a151102e2257ccc06.tar.gz | |
less arbitrary division of labour
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_channel.erl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 3f639d1471..c73d85ac05 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -328,11 +328,14 @@ handle_info(emit_stats, State = #ch{stats_timer = StatsTimer}) -> handle_info({'DOWN', _MRef, process, QPid, Reason}, State = #ch{consumer_monitors = ConsumerMonitors}) -> State1 = handle_publishing_queue_down(QPid, Reason, State), - noreply( - case gb_sets:is_member(QPid, ConsumerMonitors) of - false -> State1; - true -> handle_consuming_queue_down(QPid, State1) - end); + erase_queue_stats(QPid), + State2 = queue_blocked(QPid, State1), + State3 = case gb_sets:is_member(QPid, ConsumerMonitors) of + false -> State2; + true -> handle_consuming_queue_down(QPid, State1) + end, + noreply(State3#ch{queue_monitors = + dict:erase(QPid, State3#ch.queue_monitors)}); handle_info({'EXIT', _Pid, Reason}, State) -> {stop, Reason, State}. @@ -1200,9 +1203,7 @@ handle_publishing_queue_down(QPid, Reason, State = #ch{unconfirmed_qm = UQM}) -> {true, fun send_nacks/2} end, {MXs, State2} = process_confirms(MsgSeqNos, QPid, Nack, State1), - erase_queue_stats(QPid), - State3 = SendFun(MXs, State2), - queue_blocked(QPid, State3). + SendFun(MXs, State2). handle_consuming_queue_down(QPid, State = #ch{consumer_mapping = ConsumerMapping, |
