aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-05-17 18:31:51 +0200
committerAnders Svensson <[email protected]>2015-05-18 14:10:43 +0200
commit2599f843ccb48193348d75c287a9cfd507d09d08 (patch)
treead43e9cb41381d9575491d6c8f82df12904295ad /lib/diameter/src/base
parent0c2807d5f4ed72051c633c3ae9d3e88d8839a672 (diff)
downloadotp-2599f843ccb48193348d75c287a9cfd507d09d08.tar.gz
otp-2599f843ccb48193348d75c287a9cfd507d09d08.tar.bz2
otp-2599f843ccb48193348d75c287a9cfd507d09d08.zip
Count discarded incoming messages
An incoming Diameter message is either a request, an answer to an outstanding request, or an unexpected answer. The latter weren't counted, but are now counted on keys of this form: {pid(), {{unknown, 0}, recv, discarded}} The form of the second element is similar to those of other counters, like: {{relay, 0|1}, send|recv, invalid_error_bit} Compare this to the key used when counting known answers: {{ApplicationId, CommandCode, 0}, recv} The application id and command code aren't included so as not to count on arbitrary keys, a topic last visited in commit 49e8b11c.
Diffstat (limited to 'lib/diameter/src/base')
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl
index 517daf6678..ad63e5b150 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -259,7 +259,8 @@ recv(false, #request{ref = Ref, handler = Pid} = Req, _, Pkt, Dict0, _) ->
%% any others are discarded.
%% ... or not.
-recv(false, false, _, _, _, _) ->
+recv(false, false, TPid, _, _, _) ->
+ incr(TPid, {{unknown, 0}, recv, discarded}),
ok.
%% spawn_request/4