summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2013-04-26 12:39:40 +0100
committerTim Watson <tim@rabbitmq.com>2013-04-26 12:39:40 +0100
commitf16fde200d4bf5b017f06142d3b9e642ca48bd4b (patch)
tree2efa95470fe383467dc1cae29825e7072129be0d /src
parenta86f48a1f864e90e473f44b54abbd88b9fba463f (diff)
downloadrabbitmq-server-git-f16fde200d4bf5b017f06142d3b9e642ca48bd4b.tar.gz
Minor variable renaming, document subtle one_for_all child deletion clauses
Diffstat (limited to 'src')
-rw-r--r--src/supervisor2.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl
index ca2199905f..3b9717394f 100644
--- a/src/supervisor2.erl
+++ b/src/supervisor2.erl
@@ -1260,11 +1260,12 @@ state_del_child(Child, State) ->
del_child(Name, [Ch|Chs]) when Ch#child.name =:= Name, Ch#child.restart_type =:= temporary ->
Chs;
-del_child(NameOrPid, [Ch=#child{pid = ?restarting(_)}|_]=Chs)
- when Ch#child.name =:= NameOrPid ->
+del_child(Name, [Ch=#child{pid = ?restarting(_)}|_]=Chs)
+ when Ch#child.name =:= Name ->
Chs;
del_child(Name, [Ch|Chs]) when Ch#child.name =:= Name ->
[Ch#child{pid = undefined} | Chs];
+%% the next two clauses only handle deletions during a one_for_all restart
del_child(Pid, [Ch|Chs]) when Ch#child.pid =:= Pid, Ch#child.restart_type =:= temporary ->
Chs;
del_child(Pid, [Ch|Chs]) when Ch#child.pid =:= Pid ->