diff options
author | Simon MacMullen <simon@lshift.net> | 2010-04-22 16:56:42 +0100 |
---|---|---|
committer | Simon MacMullen <simon@lshift.net> | 2010-04-22 16:56:42 +0100 |
commit | 4e763135f0b562a9b7356ff4d62a10a1d9adc0ef (patch) | |
tree | 465a4185b49047124124f4f1934c91a6fcd95175 | |
parent | 38848c3c625f000e92352f4996a8e45c6806f2b1 (diff) | |
download | rabbitmq-server-4e763135f0b562a9b7356ff4d62a10a1d9adc0ef.tar.gz |
If the other node is down and we're only going to delegate:cast anyway we don't want to log an error, so handle badrpc by ignoring it.
-rw-r--r-- | src/delegate.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/delegate.erl b/src/delegate.erl index 03dd06ac..68739324 100644 --- a/src/delegate.erl +++ b/src/delegate.erl @@ -137,9 +137,14 @@ safe_invoke(FPid, Pid) -> process_count(Node) -> case get({process_count, Node}) of undefined -> - Count = rpc:call(Node, delegate, process_count, []), - put({process_count, Node}, Count), - Count; + case rpc:call(Node, delegate, process_count, []) of + {badrpc, _} -> + 1; % Have to return something, if we're just casting then + % we don't want to blow up + Count -> + put({process_count, Node}, Count), + Count + end; Count -> Count end. |