diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2013-08-05 12:51:15 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-08-05 12:51:15 +0100 |
commit | 0a3633c7e311e6783454f92bda72a73f086b4f77 (patch) | |
tree | ebdd79ac6b1f5558ee5d395471ae316cecb0b3bd | |
parent | 60c6b1a1a7dc0d4f2f7d9b8cf0ba146b29d40c8d (diff) | |
download | rabbitmq-server-0a3633c7e311e6783454f92bda72a73f086b4f77.tar.gz |
refactor: rpc:call already optimises calls to local nodes
plus get rid of an unnecessary 'case'.
-rw-r--r-- | src/rabbit_misc.erl | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index 8d8cb07c..84b15aa9 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -900,13 +900,8 @@ ntoab(IP) -> _ -> "[" ++ Str ++ "]" end. -is_process_alive(Pid) when node(Pid) =:= node() -> - erlang:is_process_alive(Pid); is_process_alive(Pid) -> - case rpc:call(node(Pid), erlang, is_process_alive, [Pid]) of - true -> true; - _ -> false - end. + rpc:call(node(Pid), erlang, is_process_alive, [Pid]) =:= true. pget(K, P) -> proplists:get_value(K, P). pget(K, P, D) -> proplists:get_value(K, P, D). |