diff options
author | Anders Svensson <[email protected]> | 2016-02-18 23:01:33 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-02-19 01:01:33 +0100 |
commit | cc4ccfb0756bb563c869d94b630ccfecb571d6c2 (patch) | |
tree | 178ef293a8c71ccf93902a6fdd0e2453d0778066 /lib/diameter/src/base | |
parent | 6759d8fd81d52cdfff5a1c2f788f740d1a4e6f67 (diff) | |
download | otp-cc4ccfb0756bb563c869d94b630ccfecb571d6c2.tar.gz otp-cc4ccfb0756bb563c869d94b630ccfecb571d6c2.tar.bz2 otp-cc4ccfb0756bb563c869d94b630ccfecb571d6c2.zip |
Fix handling of shared peer connections in watchdog state SUSPECT
A peer connection shared from a remote node was regarded as being
available for peer selection (aka up) as long as its peer_fsm process
was alive; that is, for the lifetime of the peer connection. In
particular, it didn't take note of transitions into watchdog state
SUSPECT, when the connection remains. As a result, retransmissions could
select the same peer connection whose watchdog transition caused the
retransmission.
A service process now broadcasts a peer_down event just as it
does a peer_up event.
The fault predates the table rearrangements of commit 8fd4e5f4.
Diffstat (limited to 'lib/diameter/src/base')
-rw-r--r-- | lib/diameter/src/base/diameter_service.erl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index d83ed9e56b..465f74a1fc 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2015. All Rights Reserved. +%% Copyright Ericsson AB 2010-2016. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -487,6 +487,9 @@ transition({service, Pid}, S) -> transition({peer, TPid, Aliases, Caps}, S) -> remote_peer_up(TPid, Aliases, Caps, S), ok; +transition({peer, TPid}, S) -> + remote_peer_down(TPid, S), + ok; %% Remote peer process has died. transition({'DOWN', _, process, TPid, _}, S) -> @@ -1421,8 +1424,9 @@ share_peer(up, Caps, Apps, TPid, #state{options = [_, {_,T} | _], service_name = Svc}) -> notify(T, Svc, {peer, TPid, [A || {_,A} <- Apps], Caps}); -share_peer(_, _, _, _, _) -> - ok. +share_peer(down, _Caps, _Apps, TPid, #state{options = [_, {_,T} | _], + service_name = Svc}) -> + notify(T, Svc, {peer, TPid}). %% --------------------------------------------------------------------------- %% # share_peers/2 |