diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-07-25 11:20:23 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-07-25 11:20:23 +0100 |
| commit | d1c7a8697c8d59f56bff84d4ae6302d0ba893691 (patch) | |
| tree | 8d41ec497233e6e89467c2fbcfd445f5e77238b0 | |
| parent | 118b59e2b3d2ef3ddefe60a3ef5514a7a8de7420 (diff) | |
| download | rabbitmq-server-git-d1c7a8697c8d59f56bff84d4ae6302d0ba893691.tar.gz | |
...and unbreak.
| -rw-r--r-- | src/rabbit_channel.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 2f6cccd4fd..f441adc88f 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1111,13 +1111,11 @@ handle_method(#'basic.credit'{consumer_tag = CTag, %% want that? Because at least then it's consistent with the credit value %% we return. And Available is always going to be racy. Available = case dict:find(CTag, Consumers) of - {ok, QName} -> - case rabbit_amqqueue:with( - QName, fun (Q) -> rabbit_amqqueue:stat(Q) end) of - {ok, Len, _} -> Len; - _ -> -1 - end; - error -> -1 + {ok, {Q, _}} -> case rabbit_amqqueue:stat(Q) of + {ok, Len, _} -> Len; + _ -> -1 + end; + error -> -1 %% TODO these -1s smell very iffy! end, LimiterPid1 = case LimiterPid of undefined -> start_limiter(State); |
