summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-11-15 15:13:16 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2012-11-15 15:13:16 +0000
commitf546b647743c8a1ffa311ac9a940992b550ee0d5 (patch)
tree5b22c73c8bf05e4eb85d87246744055e55bbcf73
parentf1e03821a9b62e1f28ffddf0a4ee4fa31006461b (diff)
downloadrabbitmq-server-bug25295.tar.gz
always monitor queues from which we are (possibly) delivering messagesbug25295
so that stats associated with these queues are cleared out from the channel's process dictionary when these queues disappear.
-rw-r--r--src/rabbit_channel.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 9dbfbdea..2afc4c36 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -1126,12 +1126,13 @@ consumer_monitor(ConsumerTag,
State
end.
-monitor_delivering_queue(true, _QPid, State) ->
- State;
-monitor_delivering_queue(false, QPid, State = #ch{queue_monitors = QMons,
+monitor_delivering_queue(NoAck, QPid, State = #ch{queue_monitors = QMons,
delivering_queues = DQ}) ->
State#ch{queue_monitors = pmon:monitor(QPid, QMons),
- delivering_queues = sets:add_element(QPid, DQ)}.
+ delivering_queues = case NoAck of
+ true -> DQ;
+ false -> sets:add_element(QPid, DQ)
+ end}.
handle_publishing_queue_down(QPid, Reason, State = #ch{unconfirmed = UC}) ->
case rabbit_misc:is_abnormal_exit(Reason) of