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 | 982ab1bc5aef51ff375b8239fb15545e6aa215ee (patch) | |
| tree | ebdd79ac6b1f5558ee5d395471ae316cecb0b3bd /src | |
| parent | 65a9d92033e021c3c0449eaef3b86829a79019b2 (diff) | |
| download | rabbitmq-server-git-982ab1bc5aef51ff375b8239fb15545e6aa215ee.tar.gz | |
refactor: rpc:call already optimises calls to local nodes
plus get rid of an unnecessary 'case'.
Diffstat (limited to 'src')
| -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 8d8cb07c6c..84b15aa9cd 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). |
