summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2013-05-07 07:52:19 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2013-05-07 07:52:19 +0100
commit5b3fccb6dcec837fc7e00a0fbee0a9f72f07eaa4 (patch)
treecc0d97ceccfe7bace95f9bd6ce753431ae749123
parentc44afbbda908628527caf1dba399b49bf0653b43 (diff)
downloadrabbitmq-server-bug23958.tar.gz
remove R13-ism imported from upstreambug23958
-rw-r--r--src/supervisor2.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl
index 8b0899a6..a51bc15c 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}