diff options
| author | Tim Watson <tim@rabbitmq.com> | 2012-11-29 12:57:37 +0000 |
|---|---|---|
| committer | Tim Watson <tim@rabbitmq.com> | 2012-11-29 12:57:37 +0000 |
| commit | 1fb5bcd81132bfcfc19e8c92c36edd1ee2651896 (patch) | |
| tree | 0677ed284a65556fe15d193c437bb086ca8e07cc /src | |
| parent | d962421283155fc580cbe59ffda2713ca30503aa (diff) | |
| download | rabbitmq-server-git-1fb5bcd81132bfcfc19e8c92c36edd1ee2651896.tar.gz | |
reduce distance to OTP
Diffstat (limited to 'src')
| -rw-r--r-- | src/supervisor2.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index c5a16a9ff0..76dc4e8301 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -74,7 +74,7 @@ start_child/2, restart_child/2, delete_child/2, terminate_child/2, which_children/1, count_children/1, - find_child/2, check_childspecs/1]). + find_child/2, check_childspecs/1]). %% Internal exports -export([init/1, handle_call/3, handle_cast/2, handle_info/2, @@ -437,7 +437,7 @@ handle_call({terminate_child, Name}, _From, State) -> %%% The requests delete_child and restart_child are invalid for %%% simple_one_for_one supervisors. handle_call({_Req, _Data}, _From, State) when ?is_simple(State) -> - {reply, {error, State#state.strategy}, State}; + {reply, {error, simple_one_for_one}, State}; handle_call({start_child, ChildSpec}, _From, State) -> case check_childspec(ChildSpec) of @@ -777,6 +777,7 @@ restart_child(Pid, Reason, #state{children = [Child]} = State) when ?is_simple(S error -> {ok, State} end; + restart_child(Pid, Reason, State) -> Children = State#state.children, case lists:keysearch(Pid, #child.pid, Children) of |
