diff options
author | Anders Svensson <[email protected]> | 2018-07-18 16:23:28 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2018-07-18 16:23:28 +0200 |
commit | f66f12e2d0014ad14d663fb1a0dafaa665bff303 (patch) | |
tree | 0ff443a04b8c44847d92ea0a3a276617ccfaab7d | |
parent | a0ae44f324576104760a63fe6cf63e0ca31756fc (diff) | |
download | otp-f66f12e2d0014ad14d663fb1a0dafaa665bff303.tar.gz otp-f66f12e2d0014ad14d663fb1a0dafaa665bff303.tar.bz2 otp-f66f12e2d0014ad14d663fb1a0dafaa665bff303.zip |
Fix function_clause when sending a request after an outgoing DPA
After DPR, the intention is that outgoing answers are sent and outgoing
requests are discarded. This was the case when the DPR was outgoing, but
if it was incoming then a subsequent outgoing request resulted in a
function_clause, bringing down the diameter_peer_fsm gen_server
associated with the transport connection in question.
With diameter_tcp/sctp, the failure can result in the connection being
reset before the peer closes it in response to DPA, but is otherwise
harmless since DPR means that the connection is already on its way down.
-rw-r--r-- | lib/diameter/src/base/diameter_peer_fsm.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl index d99f11a697..cf5e7f21d3 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-2017. All Rights Reserved. +%% Copyright Ericsson AB 2010-2018. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -901,7 +901,7 @@ outgoing(#diameter_packet{header = #diameter_header{is_request = false}} ok; %% Outgoing request: discard. -outgoing(Msg, #state{dpr = {_,_,_}}) -> +outgoing(Msg, #state{}) -> invalid(false, send_after_dpr, header(Msg)). header(#diameter_packet{header = H}) -> |