diff options
author | Anders Svensson <[email protected]> | 2014-05-22 22:38:53 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2014-05-23 16:12:04 +0200 |
commit | b1138f27083b1d36a6a20e1d2538b3fbaff61702 (patch) | |
tree | 74e33f886f9b3da01959d104f3f77067e5368fbc /lib/diameter/src/base/diameter_peer_fsm.erl | |
parent | 53aa56b26eeb97c99bd125b53121f5a3f4767949 (diff) | |
download | otp-b1138f27083b1d36a6a20e1d2538b3fbaff61702.tar.gz otp-b1138f27083b1d36a6a20e1d2538b3fbaff61702.tar.bz2 otp-b1138f27083b1d36a6a20e1d2538b3fbaff61702.zip |
Ensure watchdog dies with transport if DPA was sent
A DPR/DPA exchange should always cause the watchdog process in question
to die with the transport, so that a subsequent connection with the same
peer doesn't result in a 3 x DWR/DWA exchange. Commit 5903d6db saw to
this for the sending of DPR but neglected the corresponding problem for
DPA.
In the case of sending DPR (the aforementioned commit), note that
there's no distinction between receiving DPA as expected and not: the
watchdog dies with the transport regardless.
diameter_watchdog must be loaded first at upgrade.
Diffstat (limited to 'lib/diameter/src/base/diameter_peer_fsm.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_peer_fsm.erl | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl index 282276827f..912c1b70b4 100644 --- a/lib/diameter/src/base/diameter_peer_fsm.erl +++ b/lib/diameter/src/base/diameter_peer_fsm.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010-2013. All Rights Reserved. +%% Copyright Ericsson AB 2010-2014. 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 @@ -662,8 +662,6 @@ send_answer(Type, ReqPkt, #state{transport = TPid, dictionary = Dict} = S) -> eval([F|A], S) -> apply(F, A ++ [S]); -eval(ok, S) -> - S; eval(T, _) -> close(T). @@ -727,8 +725,8 @@ cea(CEA, RC, Dict0) -> post('CER' = T, RC, Pkt, S) -> {T, caps(S), {RC, Pkt}}; -post('DPR', _, _, _) -> - ok. +post('DPR' = T, _, _, #state{parent = Pid}) -> + [fun(S) -> Pid ! {T, self()}, S end]. rejected({capabilities_cb, _F, Reason}, T, S) -> rejected(Reason, T, S); |