diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-26 17:35:43 +0000 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-01-26 17:35:43 +0000 |
commit | c2062ff3b9ec304956c7a494caeed25c7cd8a375 (patch) | |
tree | ce683bafce6ce577e15450cf5b53d29e2bc0a9e9 | |
parent | c8f30537a924891f550484321411ba8b5d7d571f (diff) | |
download | rabbitmq-server-bug22252.tar.gz |
On recover with requeue=true, notify the limiter of the requeued messagesbug22252
-rw-r--r-- | src/rabbit_channel.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 91559ea6..b186783e 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -735,7 +735,8 @@ handle_method(#'basic.qos'{prefetch_count = PrefetchCount}, {reply, #'basic.qos_ok'{}, State#ch{limiter_pid = LimiterPid2}}; handle_method(#'basic.recover_async'{requeue = true}, - _, State = #ch{unacked_message_q = UAMQ}) -> + _, State = #ch{unacked_message_q = UAMQ, + limiter_pid = LimiterPid}) -> ok = fold_per_queue( fun (QPid, MsgIds, ok) -> %% The Qpid python test suite incorrectly assumes @@ -745,6 +746,7 @@ handle_method(#'basic.recover_async'{requeue = true}, rabbit_amqqueue:requeue( QPid, lists:reverse(MsgIds), self()) end, ok, UAMQ), + ok = notify_limiter(LimiterPid, UAMQ), %% No answer required - basic.recover is the newer, synchronous %% variant of this method {noreply, State#ch{unacked_message_q = queue:new()}}; |