diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-09 15:34:22 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-08-09 15:34:22 +0100 |
| commit | fa15cf2b931a7d67dad5dd1c25f4cf4ed3eb7e19 (patch) | |
| tree | 937eb71e76d6ca094e08f272e5a52d1618888403 /src | |
| parent | 4754d837626559b51120596c2bcb86398b731a82 (diff) | |
| download | rabbitmq-server-git-fa15cf2b931a7d67dad5dd1c25f4cf4ed3eb7e19.tar.gz | |
cosmetic
Diffstat (limited to 'src')
| -rw-r--r-- | src/supervisor2.erl | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index eb2c6bdeec..902ad8d0c3 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -529,12 +529,6 @@ restart_child(Pid, Reason, State) -> {ok, State} end. -do_restart(intrinsic, Reason, Child, State = #state{name = Name}) -> - case Reason of - normal -> ok; - _ -> report_error(child_terminated, Reason, Child, Name) - end, - {shutdown, remove_child(Child, State)}; do_restart({RestartType, Delay}, Reason, Child, State) -> case restart1(Child, State) of {ok, NState} -> @@ -545,6 +539,11 @@ do_restart({RestartType, Delay}, Reason, Child, State) -> [self(), {{RestartType, Delay}, Reason, Child}]), {ok, NState} end; +do_restart(intrinsic, normal, Child, State) -> + {shutdown, remove_child(Child, State)}; +do_restart(intrinsic, Reason, Child, State) -> + report_error(child_terminated, Reason, Child, State#state.name), + {shutdown, remove_child(Child, State)}; do_restart(permanent, Reason, Child, State) -> report_error(child_terminated, Reason, Child, State#state.name), restart(Child, State); @@ -847,8 +846,8 @@ supname(N,_) -> N. %%% {Name, Func, RestartType, Shutdown, ChildType, Modules} %%% where Name is an atom %%% Func is {Mod, Fun, Args} == {atom, atom, list} -%%% RestartType is permanent | temporary | transient | -%%% intrinsic | {permanent, Delay} | +%%% RestartType is intrinsic | permanent | temporary | +%%% transient | {permanent, Delay} | %%% {transient, Delay} where Delay >= 0 %%% Shutdown = integer() | infinity | brutal_kill %%% ChildType = supervisor | worker |
