summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_channel.erl8
-rw-r--r--src/rabbit_router.erl8
2 files changed, 4 insertions, 12 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 590bf2d61e..917188d4d4 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -554,10 +554,10 @@ handle_method(#'basic.publish'{exchange = ExchangeNameBin,
State2 = case RoutingRes of
%% Confirm transient messages now
routed ->
- case IsPersistent of
- true -> State1;
- false -> send_or_enqueue_ack(
- MsgSeqNo, State1)
+ case {IsPersistent, DeliveredQPids} of
+ {_, []} -> send_or_enqueue_ack(MsgSeqNo, State1);
+ {true, _} -> State1;
+ {false, _} -> send_or_enqueue_ack(MsgSeqNo, State1)
end;
%% Confirm after basic.returns
unroutable ->
diff --git a/src/rabbit_router.erl b/src/rabbit_router.erl
index 3d270916d5..aaf3ae927d 100644
--- a/src/rabbit_router.erl
+++ b/src/rabbit_router.erl
@@ -65,14 +65,6 @@ deliver(QPids, Delivery = #delivery{mandatory = false,
%% case below.
delegate:invoke_no_result(
QPids, fun (Pid) -> rabbit_amqqueue:deliver(Pid, Delivery) end),
- case {QPids, MsgSeqNo} of
- {_, undefined} -> ok;
- {[], _} ->
- %% No queues will get the message. This is fine, so we
- %% just confirm it.
- rabbit_channel:confirm(self(), MsgSeqNo);
- _ -> ok
- end,
maybe_inform_channel(MsgSeqNo, QPids),
{routed, QPids};