summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/supervisor2.erl5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl
index 8577a06e96..2f2e66926f 100644
--- a/src/supervisor2.erl
+++ b/src/supervisor2.erl
@@ -890,11 +890,8 @@ handle_delayed_restart({intrinsic, _Delay}=Restart, Reason, Child, State) ->
fun delete_child_and_stop/2,
Reason, Child, State).
-restart_if_explicit_or_abnormal(RestartHow, _Otherwise, Reason, Child, State)
- when ?is_explicit_restart(Reason) ->
- RestartHow(Child, State);
restart_if_explicit_or_abnormal(RestartHow, Otherwise, Reason, Child, State) ->
- case is_abnormal_termination(Reason) of
+ case ?is_explicit_restart(Reason) orelse is_abnormal_termination(Reason) of
true -> RestartHow(Child, State);
false -> Otherwise(Child, State)
end.