diff options
author | Tim Watson <tim@rabbitmq.com> | 2013-04-16 15:32:24 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2013-04-16 15:32:24 +0100 |
commit | 3af08702100e0a7ca293798f5af591c46a03e7d2 (patch) | |
tree | c8513f9f750adf23ab626aac72fe931541891940 | |
parent | 5b89f9f11418f0f5725494b88ed852540a7dbcbd (diff) | |
download | rabbitmq-server-3af08702100e0a7ca293798f5af591c46a03e7d2.tar.gz |
simplify restart_if_explicit_or_abnormal
-rw-r--r-- | src/supervisor2.erl | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index 8577a06e..2f2e6692 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. |