summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2010-02-11 16:59:34 +0000
committerMatthias Radestock <matthias@lshift.net>2010-02-11 16:59:34 +0000
commit6f4108b31d5bcc8f5ad7b7557a4144b8b6559631 (patch)
treef6c79df78c1c3ecf7c7bfdef56f097996772c0bf /src
parent9bc47b08f57f23b3368631087519f177fc9262e8 (diff)
parent94fb9309966e6aab82d2514027d873865f02ae9b (diff)
downloadrabbitmq-server-git-6f4108b31d5bcc8f5ad7b7557a4144b8b6559631.tar.gz
merge default into bug21673
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_amqqueue_process.erl25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl
index 59ea353ca7..73c3678d29 100644
--- a/src/rabbit_amqqueue_process.erl
+++ b/src/rabbit_amqqueue_process.erl
@@ -440,7 +440,8 @@ should_auto_delete(State) -> is_unused(State).
handle_ch_down(DownPid, State = #q{exclusive_consumer = Holder}) ->
case lookup_ch(DownPid) of
- not_found -> {ok, State};
+ not_found ->
+ {ok, State};
#cr{monitor_ref = MonitorRef, ch_pid = ChPid, txn = Txn,
unacked_messages = UAM} ->
erlang:demonitor(MonitorRef),
@@ -448,24 +449,22 @@ handle_ch_down(DownPid, State = #q{exclusive_consumer = Holder}) ->
State1 = State#q{
exclusive_consumer = case Holder of
{ChPid, _} -> none;
- Other -> Other
+ Other -> Other
end,
active_consumers = remove_consumers(
ChPid, State#q.active_consumers),
blocked_consumers = remove_consumers(
ChPid, State#q.blocked_consumers)},
case should_auto_delete(State1) of
- true ->
- {stop, State1};
- false ->
- State2 = case Txn of
- none -> State1;
- _ -> rollback_transaction(Txn, State1)
- end,
- {ok,
- deliver_or_requeue_n(
- [MsgWithAck ||
- {_MsgId, MsgWithAck} <- dict:to_list(UAM)], State2)}
+ true -> {stop, State1};
+ false -> State2 = case Txn of
+ none -> State1;
+ _ -> rollback_transaction(Txn, State1)
+ end,
+ {ok, deliver_or_requeue_n(
+ [MsgWithAck ||
+ {_MsgId, MsgWithAck} <- dict:to_list(UAM)],
+ State2)}
end
end.