Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 4aecd733017411b3975ef38aea37f0532cc0b324 1 parent 618642c
authored October 16, 2012
7  lib/diameter/src/base/diameter_peer_fsm.erl
@@ -1015,7 +1015,12 @@ add(false, T) ->
1015 1015
 
1016 1016
 unregistered(Nodes, T) ->
1017 1017
     {ResL, _} = rpc:multicall(Nodes, ?MODULE, match, [{node(), T}]),
1018  
-    lists:all(fun(L) -> [] == L end, ResL).
  1018
+    lists:all(fun nomatch/1, ResL).
  1019
+
  1020
+nomatch({badrpc, {'EXIT', {undef, _}}}) ->  %% no diameter on remote node
  1021
+    true;
  1022
+nomatch(L) ->
  1023
+    [] == L.
1019 1024
 
1020 1025
 %% match/1
1021 1026
 

0 notes on commit 4aecd73

Please sign in to comment.
Something went wrong with that request. Please try again.