summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2012-08-17 17:02:40 +0100
committerSimon MacMullen <simon@rabbitmq.com>2012-08-17 17:02:40 +0100
commit0712501332fafa59e9ba063500be85f0775b5c84 (patch)
tree6160596e78c2c55a29f57f907205dba82bd615ac
parent66dfeca31ca13922b71c8d961d48c304508a02c9 (diff)
downloadrabbitmq-server-0712501332fafa59e9ba063500be85f0775b5c84.tar.gz
I was thinking that which_applications needed to come first so that the
process would be gone by the time we got to is_process_alive. But if we swap them round the which_applications check will return false in the shutdown case anyway. And of course is_process_alive/1 is rather faster.
-rw-r--r--src/rabbit_mirror_queue_misc.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rabbit_mirror_queue_misc.erl b/src/rabbit_mirror_queue_misc.erl
index 8c120670..7d1efd50 100644
--- a/src/rabbit_mirror_queue_misc.erl
+++ b/src/rabbit_mirror_queue_misc.erl
@@ -110,8 +110,8 @@ is_really_alive(Pid) ->
end.
is_really_alive0(Pid) ->
- lists:keymember(rabbit, 1, application:which_applications(infinity))
- andalso is_process_alive(Pid).
+ is_process_alive(Pid) andalso
+ lists:keymember(rabbit, 1, application:which_applications(infinity)).
on_node_up() ->
Qs =