diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-02-17 18:47:08 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-02-17 18:47:08 +0000 |
commit | c3e636ef29ae984b2bb5fcf2e825bba5ee49bb78 (patch) | |
tree | 27993a3a540b4f3eb72e338f1a8cb594836e97d3 | |
parent | a4bb70b0652dd7eae95496a8c0822a586f8e57f7 (diff) | |
download | rabbitmq-server-c3e636ef29ae984b2bb5fcf2e825bba5ee49bb78.tar.gz |
...but only do that if we are not also alarmed.
-rw-r--r-- | src/rabbit_reader.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index c65ba721..b1d0e275 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -1073,10 +1073,12 @@ i(peer_cert_subject, S) -> cert_info(fun rabbit_ssl:peer_cert_subject/1, S); i(peer_cert_validity, S) -> cert_info(fun rabbit_ssl:peer_cert_validity/1, S); i(channels, #v1{channel_count = ChannelCount}) -> ChannelCount; i(state, #v1{connection_state = ConnectionState, - throttle = #throttle{last_blocked_by = WasBlockedBy, + throttle = #throttle{alarmed_by = Alarms, + last_blocked_by = WasBlockedBy, last_blocked_at = T}}) -> Recently = T =/= never andalso timer:now_diff(erlang:now(), T) < 5000000, - case {credit_flow:blocked(), WasBlockedBy, Recently} of + case {credit_flow:blocked() andalso Alarms =:= [], + WasBlockedBy, Recently} of {true, _, _} -> flow; {false, flow, true} -> flow; {_, _, _} -> ConnectionState |