summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2011-07-26 16:53:03 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2011-07-26 16:53:03 +0100
commit4f0f940bbd406e36b9e6c1663cdfcda6704926db (patch)
tree354010a19c57584c953bc42c086f1c8fb21b1dc4
parent200cf220a5dbf843b1d4287a325106448c4a201f (diff)
downloadrabbitmq-server-4f0f940bbd406e36b9e6c1663cdfcda6704926db.tar.gz
cosmeticbug24296
-rw-r--r--src/rabbit_limiter.erl15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl
index b80ad6cc..8f9ab032 100644
--- a/src/rabbit_limiter.erl
+++ b/src/rabbit_limiter.erl
@@ -204,11 +204,10 @@ remember_queue(QPid, State = #lim{queues = Queues}) ->
forget_queue(QPid, State = #lim{ch_pid = ChPid, queues = Queues}) ->
case orddict:find(QPid, Queues) of
- {ok, {MRef, _}} ->
- true = erlang:demonitor(MRef),
- ok = rabbit_amqqueue:unblock(QPid, ChPid),
- State#lim{queues = orddict:erase(QPid, Queues)};
- error -> State
+ {ok, {MRef, _}} -> true = erlang:demonitor(MRef),
+ ok = rabbit_amqqueue:unblock(QPid, ChPid),
+ State#lim{queues = orddict:erase(QPid, Queues)};
+ error -> State
end.
limit_queue(QPid, State = #lim{queues = Queues}) ->
@@ -218,9 +217,9 @@ limit_queue(QPid, State = #lim{queues = Queues}) ->
notify_queues(State = #lim{ch_pid = ChPid, queues = Queues}) ->
{QList, NewQueues} =
orddict:fold(fun (_QPid, {_, false}, Acc) -> Acc;
- (QPid, {MRef, true}, {L, D}) ->
- {[QPid | L], orddict:store(QPid, {MRef, false}, D)}
- end, {[], Queues}, Queues),
+ (QPid, {MRef, true}, {L, D}) ->
+ {[QPid | L], orddict:store(QPid, {MRef, false}, D)}
+ end, {[], Queues}, Queues),
case length(QList) of
0 -> ok;
L ->