summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-01-26 13:08:37 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-01-26 13:08:37 +0000
commit2f85548a9f482479d9a8f6e0e6c7de267d62cb11 (patch)
tree565720eef8f549091b837126d629d964decf3d69
parent1ad4ff75b6553341df7e40a1907d91a2a55c1434 (diff)
downloadrabbitmq-server-bug23748.tar.gz
Remove dead pids from children when we're delaying the restartbug23748
-rw-r--r--src/supervisor2.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl
index 18e2bdad..1a240856 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),