summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-01-17 13:25:40 +0000
committerMatthew Sackman <matthew@rabbitmq.com>2011-01-17 13:25:40 +0000
commitae365531511d3b8c3b813ea9befe84f485ecbc32 (patch)
tree000614916751c0d8c5a98d608e6f9d1fddefa01d
parentf8cd15aca29b1ce85947b6a998cdae4ef5f35a8f (diff)
parent1161a528c4917db800492aa9cf241701aa0134b2 (diff)
downloadrabbitmq-server-ae365531511d3b8c3b813ea9befe84f485ecbc32.tar.gz
Merging default into bug23631
-rw-r--r--src/rabbit_channel.erl2
-rw-r--r--src/rabbit_tests.erl13
2 files changed, 8 insertions, 7 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl
index 1e909686..5c900b0b 100644
--- a/src/rabbit_channel.erl
+++ b/src/rabbit_channel.erl
@@ -283,7 +283,7 @@ handle_cast(emit_stats, State = #ch{stats_timer = StatsTimer}) ->
hibernate};
handle_cast({confirm, MsgSeqNos, From}, State) ->
- {noreply, confirm(MsgSeqNos, From, State)}.
+ {noreply, confirm(MsgSeqNos, From, State), hibernate}.
handle_info({'DOWN', _MRef, process, QPid, _Reason},
State = #ch{unconfirmed = UC}) ->
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl
index 52f5b3cc..d8a222d1 100644
--- a/src/rabbit_tests.erl
+++ b/src/rabbit_tests.erl
@@ -2090,12 +2090,13 @@ test_queue_recover() ->
TxID = rabbit_guid:guid(),
{new, #amqqueue { pid = QPid, name = QName }} =
rabbit_amqqueue:declare(test_queue(), true, false, [], none),
- Msg = rabbit_basic:message(rabbit_misc:r(<<>>, exchange, <<>>),
- <<>>, #'P_basic'{delivery_mode = 2}, <<>>),
- Delivery = #delivery{mandatory = false, immediate = false, txn = TxID,
- sender = self(), message = Msg},
- [true = rabbit_amqqueue:deliver(QPid, Delivery) ||
- _ <- lists:seq(1, Count)],
+ [begin
+ Msg = rabbit_basic:message(rabbit_misc:r(<<>>, exchange, <<>>),
+ <<>>, #'P_basic'{delivery_mode = 2}, <<>>),
+ Delivery = #delivery{mandatory = false, immediate = false, txn = TxID,
+ sender = self(), message = Msg},
+ true = rabbit_amqqueue:deliver(QPid, Delivery)
+ end || _ <- lists:seq(1, Count)],
rabbit_amqqueue:commit_all([QPid], TxID, self()),
exit(QPid, kill),
MRef = erlang:monitor(process, QPid),