diff options
author | Tim Watson <tim@rabbitmq.com> | 2013-04-16 15:28:32 +0100 |
---|---|---|
committer | Tim Watson <tim@rabbitmq.com> | 2013-04-16 15:28:32 +0100 |
commit | 5b89f9f11418f0f5725494b88ed852540a7dbcbd (patch) | |
tree | 251490f63fd26177ece68fa81ffaff0b3f7d1dac | |
parent | d9610f82621d5e6ad4617fe9fa44ed3887237cea (diff) | |
download | rabbitmq-server-5b89f9f11418f0f5725494b88ed852540a7dbcbd.tar.gz |
drop function guards from restart_if_explicit_or_abnormal
-rw-r--r-- | src/supervisor2.erl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index 4014f9ee..8577a06e 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -891,12 +891,9 @@ handle_delayed_restart({intrinsic, _Delay}=Restart, Reason, Child, State) -> Reason, Child, State). restart_if_explicit_or_abnormal(RestartHow, _Otherwise, Reason, Child, State) - when is_function(RestartHow, 2) andalso - ?is_explicit_restart(Reason) -> + when ?is_explicit_restart(Reason) -> RestartHow(Child, State); -restart_if_explicit_or_abnormal(RestartHow, Otherwise, Reason, Child, State) - when is_function(RestartHow, 2) andalso - is_function(Otherwise, 2) -> +restart_if_explicit_or_abnormal(RestartHow, Otherwise, Reason, Child, State) -> case is_abnormal_termination(Reason) of true -> RestartHow(Child, State); false -> Otherwise(Child, State) |