diff options
| author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2012-02-17 11:07:25 +0000 |
|---|---|---|
| committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2012-02-17 11:07:25 +0000 |
| commit | 8cb2906111da6eace1c2686ed8ec4573b2c992e2 (patch) | |
| tree | 0a528ae901c5ce65ff78b828db14ad171aa00403 | |
| parent | 22f3580833dd1c46a678ec3b87d1fdde8a8aaf6c (diff) | |
| download | rabbitmq-server-git-8cb2906111da6eace1c2686ed8ec4573b2c992e2.tar.gz | |
hang subsequent queue deletions
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 5305935b49..0395244b57 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -838,7 +838,8 @@ handle_confirm(MsgSeqNos, QPid, State = #q{unconfirmed_mq = UMQ, stop_later(Reason, State) -> stop_later(Reason, undefined, noreply, State). -stop_later(Reason, From, Reply, State = #q{unconfirmed_mq = UMQ}) -> +stop_later(Reason, From, Reply, State = #q{unconfirmed_mq = UMQ, + delayed_delete = undefined}) -> case {gb_trees:is_empty(UMQ), Reply} of {true, noreply} -> {stop, Reason, State}; @@ -846,7 +847,11 @@ stop_later(Reason, From, Reply, State = #q{unconfirmed_mq = UMQ}) -> {stop, Reason, Reply, State}; {false, _} -> noreply(State#q{delayed_delete = {Reason, {From, Reply}}}) - end. + end; +stop_later(_, _, _, State) -> + %% All subsequent attempts to stop a stopping queue will hang; the + %% caller will eventually receive a 'noproc'. + noreply(State). cleanup_after_confirm(State = #q{delayed_delete = DD, unconfirmed_mq = UMQ}) -> |
