summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Harrop <rob@rabbitmq.com>2011-07-19 11:05:11 +0100
committerRob Harrop <rob@rabbitmq.com>2011-07-19 11:05:11 +0100
commitf37aed126d810e623b41f6a0eade002eec4c3b16 (patch)
tree93e7c2fd401bee8fe2c4e8ea714ef4bc42be04aa
parent97b6abe0842247b2a2b8f64fc9c91befef6ec79a (diff)
parent31cdc2f23f169beff7ba25e64746a0c4f335dd57 (diff)
downloadrabbitmq-server-f37aed126d810e623b41f6a0eade002eec4c3b16.tar.gz
Merge bug24273 into default
-rw-r--r--src/rabbit_channel.erl14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 8310bd8e..f398fcc5 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1131,10 +1131,16 @@ handle_publishing_queue_down(QPid, Reason, State = #ch{unconfirmed_qm = UQM}) ->
%% process_confirms to prevent each MsgSeqNo being removed from
%% the set one by one which which would be inefficient
State1 = State#ch{unconfirmed_qm = gb_trees:delete_any(QPid, UQM)},
- {Nack, SendFun} = case Reason of
- normal -> {false, fun record_confirms/2};
- _ -> {true, fun send_nacks/2}
- end,
+ {Nack, SendFun} =
+ case Reason of
+ Reason when Reason =:= noproc; Reason =:= noconnection;
+ Reason =:= normal; Reason =:= shutdown ->
+ {false, fun record_confirms/2};
+ {shutdown, _} ->
+ {false, fun record_confirms/2};
+ _ ->
+ {true, fun send_nacks/2}
+ end,
{MXs, State2} = process_confirms(MsgSeqNos, QPid, Nack, State1),
erase_queue_stats(QPid),
State3 = SendFun(MXs, State2),