From 125abf0cce4a3aa3223cc3fc6aa4a4be1bbd2966 Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Thu, 18 Aug 2011 18:45:24 +0100 Subject: Reverse the polarity, so that it is actually *right*, and make the nearby comment clearer. --- src/mirrored_supervisor.erl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mirrored_supervisor.erl b/src/mirrored_supervisor.erl index e273470f..8dfe39f8 100644 --- a/src/mirrored_supervisor.erl +++ b/src/mirrored_supervisor.erl @@ -311,9 +311,12 @@ init({overall, Group, Init}) -> Mirroring = {mirroring, {?MODULE, start_internal, [Group, ChildSpecs]}, permanent, 16#ffffffff, worker, [?MODULE]}, - %% Important: Delegate MUST start after Mirroring, see comment in - %% handle_info('DOWN', ...) below - {ok, {{one_for_all, 0, 1}, [Mirroring, Delegate]}}; + %% Important: Delegate MUST start before Mirroring so that + %% when we shut down from above it shuts down last, so + %% Mirroring does not see it die. + %% + %% See comment in handle_info('DOWN', ...) below + {ok, {{one_for_all, 0, 1}, [Delegate, Mirroring]}}; ignore -> ignore end; -- cgit v1.2.1