summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2013-04-24 14:45:14 +0100
committerEmile Joubert <emile@rabbitmq.com>2013-04-24 14:45:14 +0100
commit1435e1e956196cc333bda8ca55bfd1a72fa93850 (patch)
tree91c88c9b94ef27184c937504d8c5d3965c16f3db /src
parenteb93f42e6c2d178fc76955fc6777e1dc62650f2d (diff)
downloadrabbitmq-server-git-1435e1e956196cc333bda8ca55bfd1a72fa93850.tar.gz
Move the peer_down handling to sender_death, since that's when the slave really
gives up on a sender. Transplant of 55f7c6afabe0
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_mirror_queue_slave.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index 222457c60d..17337d9aba 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -595,8 +595,7 @@ ensure_monitoring(ChPid, State = #state { known_senders = KS }) ->
local_sender_death(ChPid, State = #state { known_senders = KS }) ->
ok = case pmon:is_monitored(ChPid, KS) of
false -> ok;
- true -> credit_flow:peer_down(ChPid),
- confirm_sender_death(ChPid)
+ true -> confirm_sender_death(ChPid)
end,
State.
@@ -779,6 +778,7 @@ process_instruction({sender_death, ChPid},
lists:foldl(fun dict:erase/2, MS,
sets:to_list(PendingCh))
end,
+ credit_flow:peer_down(ChPid),
State #state { sender_queues = dict:erase(ChPid, SQ),
msg_id_status = MS1,
known_senders = pmon:demonitor(ChPid, KS) }