diff options
| author | Ben Hood <0x6e6562@gmail.com> | 2008-11-21 14:08:11 +0000 |
|---|---|---|
| committer | Ben Hood <0x6e6562@gmail.com> | 2008-11-21 14:08:11 +0000 |
| commit | 6c6d8477623f543cb461a045f008a9fcbc320629 (patch) | |
| tree | 6b67fec8a1a5f1cd7ddae1ce09e36a0387376031 | |
| parent | 86db69511aa3026a1f6391f98a7a11da6604cbde (diff) | |
| download | rabbitmq-server-git-6c6d8477623f543cb461a045f008a9fcbc320629.tar.gz | |
Fixed bug in limiter
| -rw-r--r-- | src/rabbit_limiter.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_limiter.erl b/src/rabbit_limiter.erl index adf4cd4beb..abca7ce1b1 100644 --- a/src/rabbit_limiter.erl +++ b/src/rabbit_limiter.erl @@ -5,7 +5,7 @@ % I'm starting out with a gen_server because of the synchronous query % that the queue process makes --behviour(gen_server). +-behaviour(gen_server). -export([init/1, terminate/2, code_change/3, handle_call/3, handle_cast/2, handle_info/2]). @@ -55,9 +55,9 @@ handle_call({can_send, QPid}, _From, State) -> % capacity infromation. handle_cast({decrement_capacity, QPid}, State) -> NewState = decrement_in_use(QPid, State), - ShouldNotify = limit_reached(State) and not(limit_reached(State)), + ShouldNotify = limit_reached(State) and not(limit_reached(NewState)), if - ShouldNotify -> notify_queues(NewState); + ShouldNotify -> notify_queues(State); true -> ok end, {noreply, NewState}. |
