Permalink
Browse files

Allow for no diameter on remote node in connection guard

The guard is against a connection to a given peer already existing but
fails if diameter is not running on a remote node.

Note that the guard itself is to be made configurable in R15B03
(OTP-10493) to allow multiple connections per peer.
  • Loading branch information...
1 parent 618642c commit 4aecd733017411b3975ef38aea37f0532cc0b324 Anders Svensson committed Oct 15, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/diameter/src/base/diameter_peer_fsm.erl
@@ -1015,7 +1015,12 @@ add(false, T) ->
unregistered(Nodes, T) ->
{ResL, _} = rpc:multicall(Nodes, ?MODULE, match, [{node(), T}]),
- lists:all(fun(L) -> [] == L end, ResL).
+ lists:all(fun nomatch/1, ResL).
+
+nomatch({badrpc, {'EXIT', {undef, _}}}) -> %% no diameter on remote node
+ true;
+nomatch(L) ->
+ [] == L.
%% match/1

0 comments on commit 4aecd73

Please sign in to comment.