Blame rabbitmq-server-0002-Unblock-receive-after-15s.patch

3f8d36
From: Diana Corbacho <diana.corbacho@erlang-solutions.com>
3f8d36
Date: Tue, 26 Jan 2016 13:10:58 +0000
3f8d36
Subject: [PATCH] Unblock receive after 15s
3f8d36
3f8d36
3f8d36
diff --git a/src/rabbit_mirror_queue_master.erl b/src/rabbit_mirror_queue_master.erl
3f8d36
index 7890128..b7c2d9d 100644
3f8d36
--- a/src/rabbit_mirror_queue_master.erl
3f8d36
+++ b/src/rabbit_mirror_queue_master.erl
3f8d36
@@ -208,7 +208,15 @@ stop_all_slaves(Reason, #state{name = QName, gm = GM}) ->
3f8d36
     %% monitor them but they would not have received the GM
3f8d36
     %% message. So only wait for slaves which are still
3f8d36
     %% not-partitioned.
3f8d36
-    [receive {'DOWN', MRef, process, _Pid, _Info} -> ok end
3f8d36
+    [receive
3f8d36
+         {'DOWN', MRef, process, _Pid, _Info} ->
3f8d36
+             ok
3f8d36
+     after 15000 ->
3f8d36
+             rabbit_mirror_queue_misc:log_warning(
3f8d36
+               QName, "Missing 'DOWN' message from ~p in node ~p~n",
3f8d36
+               [Pid, node(Pid)]),
3f8d36
+             ok
3f8d36
+     end
3f8d36
      || {Pid, MRef} <- PidsMRefs, rabbit_mnesia:on_running_node(Pid)],
3f8d36
     %% Normally when we remove a slave another slave or master will
3f8d36
     %% notice and update Mnesia. But we just removed them all, and