diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-07-06 11:31:15 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-07-06 11:31:15 +0100 |
| commit | 2e9d93e50947ac2b430fb98ff86ba66682997949 (patch) | |
| tree | 4a8314ea90488e0649318f707c46057d405daa08 /src | |
| parent | dbf3594e3d34e3b35404061b68ce2cca5e1cbe5f (diff) | |
| download | rabbitmq-server-git-2e9d93e50947ac2b430fb98ff86ba66682997949.tar.gz | |
Dialyser points out that start_link may return other than {ok, Pid}.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mirrored_supervisor.erl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mirrored_supervisor.erl b/src/mirrored_supervisor.erl index 07ec672228..6a4304cb49 100644 --- a/src/mirrored_supervisor.erl +++ b/src/mirrored_supervisor.erl @@ -234,10 +234,12 @@ start_link({global, _SupName}, _Group, _Mod, _Args) -> exit(mirrored_supervisors_must_not_be_globally_named). start_link0(Prefix, Group, Mod, Args) -> - {ok, Pid} = apply(?SUPERVISOR, start_link, - Prefix ++ [?MODULE, {overall, Group, Mod, Args}]), - call(Pid, {finish_startup, Pid}), - {ok, Pid}. + case apply(?SUPERVISOR, start_link, + Prefix ++ [?MODULE, {overall, Group, Mod, Args}]) of + {ok, Pid} -> call(Pid, {finish_startup, Pid}), + {ok, Pid}; + Other -> Other + end. start_child(Sup, ChildSpec) -> call(Sup, {start_child, ChildSpec}). delete_child(Sup, Name) -> call(Sup, {delete_child, Name}). |
