diff options
Diffstat (limited to 'src/rabbit_channel.erl')
-rw-r--r-- | src/rabbit_channel.erl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 4a0e93be..0c1c11d8 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1116,11 +1116,12 @@ monitor_queue(QPid, State = #ch{queue_monitors = QMons}) -> end. handle_publishing_queue_down(QPid, Reason, State = #ch{unconfirmed = UC}) -> - {MXs, UC1} = dtree:take(QPid, UC), - (case rabbit_misc:is_abnormal_termination(Reason) of - true -> fun send_nacks/2; - false -> fun record_confirms/2 - end)(MXs, State#ch{unconfirmed = UC1}). + case rabbit_misc:is_abnormal_termination(Reason) of + true -> {MXs, UC1} = dtree:take_all(QPid, UC), + send_nacks(MXs, State#ch{unconfirmed = UC1}); + false -> {MXs, UC1} = dtree:take(QPid, UC), + record_confirms(MXs, State#ch{unconfirmed = UC1}) + end. handle_consuming_queue_down(QPid, State = #ch{consumer_mapping = ConsumerMapping, |