diff options
author | Anders Svensson <[email protected]> | 2016-03-17 14:50:53 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2016-03-18 09:28:59 +0100 |
commit | 14eb86d85c5f191d78013aaa45b7e1aabf04a937 (patch) | |
tree | 7aeeb8354f37fe67c55c088a76c002ff3ac604d7 /lib/diameter/src/transport | |
parent | c322099e7e7efeb01577e4c8efd52579beb90949 (diff) | |
download | otp-14eb86d85c5f191d78013aaa45b7e1aabf04a937.tar.gz otp-14eb86d85c5f191d78013aaa45b7e1aabf04a937.tar.bz2 otp-14eb86d85c5f191d78013aaa45b7e1aabf04a937.zip |
Let throttling callback send a throttle message
That is, don't assume that it's only diameter_tcp doing so: allow it to
be received when not throttling. This lets a callback module trigger a
new throttling callback itself, but it's not clear if this will be
useful in practice.
Diffstat (limited to 'lib/diameter/src/transport')
-rw-r--r-- | lib/diameter/src/transport/diameter_tcp.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/diameter/src/transport/diameter_tcp.erl b/lib/diameter/src/transport/diameter_tcp.erl index 01f5bb8e66..1622e1b3d4 100644 --- a/lib/diameter/src/transport/diameter_tcp.erl +++ b/lib/diameter/src/transport/diameter_tcp.erl @@ -555,8 +555,9 @@ transition({P, Sock, Bin}, #transport{socket = Sock, recv(Bin, S); %% Make a new throttling callback after a timeout. -transition(throttle, #transport{throttled = B} = S) -> - true = false /= B, %% assert +transition(throttle, #transport{throttled = false}) -> + ok; +transition(throttle, S) -> throttle(S); %% Capabilties exchange has decided on whether or not to run over TLS. |