summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-12-10 18:13:35 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2012-12-10 18:13:35 +0000
commit56559bc440e7caf02aaf548c0794901a3be43a96 (patch)
treea4df45669520aecca254a132b43fea7b5fa2c61b
parent87ff57debbf1d51a4edcef180d30375d04ba2a78 (diff)
parent79c8fc4161be23a8363201b879edc6766aac6a9d (diff)
downloadrabbitmq-server-56559bc440e7caf02aaf548c0794901a3be43a96.tar.gz
merge bug25351 into stable
-rw-r--r--src/rabbit_vm.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/rabbit_vm.erl b/src/rabbit_vm.erl
index e9679276..db674f91 100644
--- a/src/rabbit_vm.erl
+++ b/src/rabbit_vm.erl
@@ -127,10 +127,13 @@ plugin_memory() ->
is_plugin(atom_to_list(App))]).
plugin_memory(App) ->
- case catch application_master:get_child(
- application_controller:get_master(App)) of
- {Pid, _} -> sup_memory(Pid);
- _ -> 0
+ case application_controller:get_master(App) of
+ undefined -> 0;
+ Master -> case application_master:get_child(Master) of
+ {Pid, _} when is_pid(Pid) -> sup_memory(Pid);
+ Pid when is_pid(Pid) -> sup_memory(Pid);
+ _ -> 0
+ end
end.
is_plugin("rabbitmq_" ++ _) -> true;