aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-03-15 16:42:44 +0100
committerAnders Svensson <[email protected]>2017-06-11 16:30:33 +0200
commit6b7ec6db6bd999a509e867aef438b3b8769cae43 (patch)
tree6cc0f3350e5986db49a9d387e96a2a05c163e35f /lib/diameter/src
parent4bad839a0931d7a926118c49f20cfab6ebcfdb91 (diff)
downloadotp-6b7ec6db6bd999a509e867aef438b3b8769cae43.tar.gz
otp-6b7ec6db6bd999a509e867aef438b3b8769cae43.tar.bz2
otp-6b7ec6db6bd999a509e867aef438b3b8769cae43.zip
Fix broken discard acknowledgement
A transport process can request acknowledgement of the fate of an incoming message to a specified pid, causing it to receive one of {diameter, {request|answer, pid()} | discard} depending on whether or not diameter passes the message off to a handler process. This was broken in commit a4da06a5 (since recv/3 threw a message that should be received), but is of little consequence since the interface isn't yet documented and is only used from diameter_tcp with configuration that will soon change.
Diffstat (limited to 'lib/diameter/src')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index f28b8f2910..4484b7ee2c 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -590,11 +590,9 @@ incoming(Name, Pkt, false, S) ->
recv(Name, Pkt, S);
incoming(Name, Pkt, NPid, S) ->
- try
- recv(Name, Pkt, S)
- after
- NPid ! {diameter, discard}
- end.
+ NS = recv(Name, Pkt, S),
+ NPid ! {diameter, discard},
+ NS.
%% recv/3