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 | ca953358dbd6dfc611eb5b5eba1cd8342a3e079d (patch) | |
| tree | 465a4185b49047124124f4f1934c91a6fcd95175 | |
| parent | 21a21dd66a01957699f110bd85a192303bea2365 (diff) | |
| download | rabbitmq-server-git-ca953358dbd6dfc611eb5b5eba1cd8342a3e079d.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 03dd06acd3..68739324e6 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. |
