summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2013-04-16 15:32:24 +0100
committerTim Watson <tim@rabbitmq.com>2013-04-16 15:32:24 +0100
commit76c58c073ee011186eabd25c13892eed3e67be13 (patch)
treec8513f9f750adf23ab626aac72fe931541891940 /src
parent646c4baf5de2e2b810086765ed3e3fb63820da83 (diff)
downloadrabbitmq-server-git-76c58c073ee011186eabd25c13892eed3e67be13.tar.gz
simplify restart_if_explicit_or_abnormal
Diffstat (limited to 'src')
-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.