summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-06-25 15:43:27 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-06-25 15:43:27 +0100
commitd17b23652ce8d164e7bd86d0185474b2798d5764 (patch)
tree3c8957df2d118d1e73a01d215049338c1094c4a4
parent24e9466d265cdbcaf2267fb17e56b273f1db31e7 (diff)
downloadrabbitmq-server-d17b23652ce8d164e7bd86d0185474b2798d5764.tar.gz
Close down the slave's GM the same way the master's GM does.
-rw-r--r--src/rabbit_mirror_queue_slave.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rabbit_mirror_queue_slave.erl b/src/rabbit_mirror_queue_slave.erl
index e412fbbc..2109bdd8 100644
--- a/src/rabbit_mirror_queue_slave.erl
+++ b/src/rabbit_mirror_queue_slave.erl
@@ -351,10 +351,15 @@ handle_msg([_SPid], _From, {ensure_monitoring, _Pid}) ->
ok;
handle_msg([SPid], _From, {process_death, Pid}) ->
inform_deaths(SPid, [Pid]);
+handle_msg([CPid], _From, {delete_and_terminate, Reason} = Msg) ->
+ ok = gen_server2:cast(CPid, {gm, Msg}),
+ {stop, Reason};
handle_msg([SPid], _From, Msg) ->
ok = gen_server2:cast(SPid, {gm, Msg}).
inform_deaths(SPid, Deaths) ->
+ %% TODO can we get rid of this with_exit_handler use? See bug
+ %% 24988 comment 13.
rabbit_misc:with_exit_handler(
fun () -> {stop, normal} end,
fun () ->