summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2013-04-16 15:28:32 +0100
committerTim Watson <tim@rabbitmq.com>2013-04-16 15:28:32 +0100
commit646c4baf5de2e2b810086765ed3e3fb63820da83 (patch)
tree251490f63fd26177ece68fa81ffaff0b3f7d1dac /src
parente085ab910bae91d7821804c8a771f82f2d817d3a (diff)
downloadrabbitmq-server-git-646c4baf5de2e2b810086765ed3e3fb63820da83.tar.gz
drop function guards from restart_if_explicit_or_abnormal
Diffstat (limited to 'src')
-rw-r--r--src/supervisor2.erl7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl
index 4014f9ee41..8577a06e96 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)