Skip to content

Commit

Permalink
Allow for no diameter on remote node in connection guard
Browse files Browse the repository at this point in the history
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
Anders Svensson committed Nov 5, 2012
1 parent 618642c commit 4aecd73
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/diameter/src/base/diameter_peer_fsm.erl
Expand Up @@ -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

Expand Down

0 comments on commit 4aecd73

Please sign in to comment.