diff options
| author | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-26 13:08:37 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-26 13:08:37 +0000 |
| commit | 73711540bfe3741072ce9abcfa77b3e5c1af91f3 (patch) | |
| tree | 565720eef8f549091b837126d629d964decf3d69 /src | |
| parent | 462f4544fd733e95086dc13bbac1d5b2fed88506 (diff) | |
| download | rabbitmq-server-git-73711540bfe3741072ce9abcfa77b3e5c1af91f3.tar.gz | |
Remove dead pids from children when we're delaying the restart
Diffstat (limited to 'src')
| -rw-r--r-- | src/supervisor2.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index 18e2bdadb9..1a240856ce 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -359,8 +359,8 @@ handle_cast({delayed_restart, {RestartType, Reason, Child}}, State) {noreply, NState}; handle_cast({delayed_restart, {RestartType, Reason, Child}}, State) -> case get_child(Child#child.name, State) of - {value, Child} -> - {ok, NState} = do_restart(RestartType, Reason, Child, State), + {value, Child1} -> + {ok, NState} = do_restart(RestartType, Reason, Child1, State), {noreply, NState}; _ -> {noreply, State} @@ -539,7 +539,7 @@ do_restart({RestartType, Delay}, Reason, Child, State) -> {ok, _TRef} = timer:apply_after( trunc(Delay*1000), ?MODULE, delayed_restart, [self(), {{RestartType, Delay}, Reason, Child}]), - {ok, NState} + {ok, state_del_child(Child, NState)} end; do_restart(permanent, Reason, Child, State) -> report_error(child_terminated, Reason, Child, State#state.name), |
