diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2013-05-07 07:53:03 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-05-07 07:53:03 +0100 |
| commit | b365a806570224761307a3bdd25b1417d2746ce1 (patch) | |
| tree | ed37d9a8190099887529be326cc7c9e78f99161c /src | |
| parent | 132118ea4697b489d2b97f1b0a89895229d93c08 (diff) | |
| parent | 0c27a741d665cc7e3e7b3251aa1dc1644ed1c6a7 (diff) | |
| download | rabbitmq-server-git-b365a806570224761307a3bdd25b1417d2746ce1.tar.gz | |
merge bug23958 into default
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 8b0899a68b..a51bc15cb6 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -655,8 +655,9 @@ handle_cast({try_again_restart,Pid,Reason}, #state{children=[Child]}=State) end; handle_cast({try_again_restart,Name,Reason}, State) -> - case lists:keyfind(Name,#child.name,State#state.children) of - Child = #child{pid=?restarting(_), restart_type=RestartType} -> + %% we still support >= R12-B3 in which lists:keyfind/3 doesn't exist + case lists:keysearch(Name,#child.name,State#state.children) of + {value, Child = #child{pid=?restarting(_), restart_type=RestartType}} -> try_restart(RestartType, Reason, Child, State); _ -> {noreply,State} |
