summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-10-15 13:00:17 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-10-15 13:00:17 +0100
commitd69c2901031d55c04e085f4fe83d89ae852e4a8a (patch)
treef3d79c2af0c403d33a2b3f3f9eae3316af1115bf
parent8cd6e44bfe08dd5bff61c9ab8f929caa06f29856 (diff)
parentbf630bd68f5e1f7c7ef91499746ab0559d1975a5 (diff)
downloadrabbitmq-server-d69c2901031d55c04e085f4fe83d89ae852e4a8a.tar.gz
merge default into bug25225
-rw-r--r--src/rabbit_mirror_queue_slave.erl20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index f4679184..9e290126 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -639,17 +639,15 @@ maybe_enqueue_message(
State1 #state { msg_id_status = dict:erase(MsgId, MS),
sender_queues = SQ1 };
{ok, published} ->
- {MS1, SQ1} =
- case needs_confirming(Delivery, State1) of
- never -> {dict:erase(MsgId, MS),
- remove_from_pending_ch(MsgId, ChPid, SQ)};
- eventually -> MMS = {published, ChPid, MsgSeqNo},
- {dict:store(MsgId, MMS, MS), SQ};
- immediately -> ok = rabbit_misc:confirm_to_sender(
- ChPid, [MsgSeqNo]),
- {dict:erase(MsgId, MS),
- remove_from_pending_ch(MsgId, ChPid, SQ)}
- end,
+ MS1 = case needs_confirming(Delivery, State1) of
+ never -> dict:erase(MsgId, MS);
+ eventually -> MMS = {published, ChPid, MsgSeqNo},
+ dict:store(MsgId, MMS, MS);
+ immediately -> ok = rabbit_misc:confirm_to_sender(
+ ChPid, [MsgSeqNo]),
+ dict:erase(MsgId, MS)
+ end,
+ SQ1 = remove_from_pending_ch(MsgId, ChPid, SQ),
State1 #state { msg_id_status = MS1,
sender_queues = SQ1 };
{ok, discarded} ->