summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-12-12 16:35:51 +0000
committerSimon MacMullen <simon@rabbitmq.com>2013-12-12 16:35:51 +0000
commit11ab73575f1becfc72d98bb07c69a4d0f92a51c3 (patch)
tree0f68fde6dbb219dc08c425e525ffd058558c1a86
parent1d7b65f48f48e08f7c55416130d78cc3c7d7ac94 (diff)
downloadrabbitmq-server-11ab73575f1becfc72d98bb07c69a4d0f92a51c3.tar.gz
Simplify
-rw-r--r--src/rabbit_reader.erl8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 67effab0..2e045b2b 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -1046,11 +1046,9 @@ i(state, #v1{connection_state = ConnectionState,
throttle = #throttle{last_blocked_by = BlockedBy,
last_blocked_at = T}}) ->
Recent = T =/= never andalso timer:now_diff(erlang:now(), T) < 5000000,
- case {BlockedBy, ConnectionState, Recent} of
- {resourse, blocked, _} -> blocked;
- {_, blocking, _} -> blocking;
- {flow, _, true} -> flow;
- {_, _, _} -> ConnectionState
+ case {BlockedBy, Recent} of
+ {flow, true} -> flow;
+ {_, _} -> ConnectionState
end;
i(Item, #v1{connection = Conn}) -> ic(Item, Conn).