diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2012-08-17 17:02:40 +0100 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2012-08-17 17:02:40 +0100 |
commit | 0712501332fafa59e9ba063500be85f0775b5c84 (patch) | |
tree | 6160596e78c2c55a29f57f907205dba82bd615ac | |
parent | 66dfeca31ca13922b71c8d961d48c304508a02c9 (diff) | |
download | rabbitmq-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.erl | 4 |
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 = |