summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-08-09 13:17:25 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-08-09 13:17:25 +0100
commit2f0fc194f5fbc0ea053cf34ed892f07170503370 (patch)
tree981ec4f3e2a700b4eaf1f948d1e8e21e342fcc6d
parentc9f225ff25082a651706292d906d77f9f40026d6 (diff)
downloadrabbitmq-server-git-2f0fc194f5fbc0ea053cf34ed892f07170503370.tar.gz
Flatten.
-rw-r--r--src/mirrored_supervisor.erl14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/mirrored_supervisor.erl b/src/mirrored_supervisor.erl
index 3ecff1efea..2501df4698 100644
--- a/src/mirrored_supervisor.erl
+++ b/src/mirrored_supervisor.erl
@@ -246,16 +246,10 @@ start_link0(Prefix, Group, Init) ->
init(Mod, Args) ->
case Mod:init(Args) of
- Init = {ok, {Restart, _ChildSpecs}} ->
- case Restart of
- {Bad, _, _} when Bad =:= simple_one_for_one orelse
- Bad =:= simple_one_for_one_terminate ->
- error(badarg);
- _ ->
- Init
- end;
- ignore ->
- ignore
+ {ok, {{Bad, _, _}, _ChildSpecs}} when
+ Bad =:= simple_one_for_one orelse
+ Bad =:= simple_one_for_one_terminate -> error(badarg);
+ Init -> Init
end.
start_child(Sup, ChildSpec) -> call(Sup, {start_child, ChildSpec}).