From 8f9c5c2a0428a9dac54e3b0ff0a514cf740316b4 Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 28 Nov 2012 14:04:18 +0000 Subject: We should flush here too, to not leave a junk 'DOWN' message when the syncer exits. Also there's no sync_complete_ok any more... --- src/rabbit_mirror_queue_sync.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/rabbit_mirror_queue_sync.erl') diff --git a/src/rabbit_mirror_queue_sync.erl b/src/rabbit_mirror_queue_sync.erl index 8d0407f2..6626ee2e 100644 --- a/src/rabbit_mirror_queue_sync.erl +++ b/src/rabbit_mirror_queue_sync.erl @@ -163,8 +163,7 @@ slave_sync_loop(Args = {Ref, MRef, Syncer, BQ, UpdateRamDur}, TRef, BQS) -> credit_flow:handle_bump_msg(Msg), slave_sync_loop(Args, TRef, BQS); {sync_complete, Ref} -> - Syncer ! {sync_complete_ok, Ref, self()}, - erlang:demonitor(MRef), + erlang:demonitor(MRef, [flush]), credit_flow:peer_down(Syncer), {ok, {TRef, BQS}}; {'$gen_cast', {set_maximum_since_use, Age}} -> -- cgit v1.2.1