summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Klishin <mklishin@pivotal.io>2016-09-26 18:17:13 +0300
committerMichael Klishin <mklishin@pivotal.io>2016-09-26 18:17:13 +0300
commitb24fb403700f4708dc9b8f7abbfe09bdc56d7a00 (patch)
treee67e060e5e86ef6e94052c34ff51151b41b576b1 /src
parenta2ad24faedc32eaca771db0f6a75a1a5282b311c (diff)
parenta40b517c4f20be94bc007e83541e18a3da85b5f5 (diff)
downloadrabbitmq-server-git-b24fb403700f4708dc9b8f7abbfe09bdc56d7a00.tar.gz
Merge branch 'stable'
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_mirror_queue_sync.erl12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rabbit_mirror_queue_sync.erl b/src/rabbit_mirror_queue_sync.erl
index ad1a25a425..d6357e0dc0 100644
--- a/src/rabbit_mirror_queue_sync.erl
+++ b/src/rabbit_mirror_queue_sync.erl
@@ -248,9 +248,15 @@ syncer_loop(Ref, MPid, SPids) ->
syncer_loop(Ref, MPid, SPids);
{msgs, Ref, Msgs} ->
SPids1 = wait_for_credit(SPids),
- broadcast(SPids1, {sync_msgs, Ref, Msgs}),
- MPid ! {next, Ref},
- syncer_loop(Ref, MPid, SPids1);
+ case SPids1 of
+ [] ->
+ % Die silently because there are no slaves left.
+ ok;
+ _ ->
+ broadcast(SPids1, {sync_msgs, Ref, Msgs}),
+ MPid ! {next, Ref},
+ syncer_loop(Ref, MPid, SPids1)
+ end;
{cancel, Ref} ->
%% We don't tell the slaves we will die - so when we do
%% they interpret that as a failure, which is what we