diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2014-03-27 19:12:04 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2014-03-27 19:12:04 +0000 |
commit | 4e4cb4870682a1f21eeb4c357d16d0334f6871c2 (patch) | |
tree | 3aa703130236c2d650d99b01fd7a9b10df149f08 | |
parent | 8e0c32ae0d51981540632771732af18d60b6debe (diff) | |
download | rabbitmq-server-bug26088.tar.gz |
handle amqqueue:delete errors gracefullybug26088
-rw-r--r-- | src/rabbit_vhost.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rabbit_vhost.erl b/src/rabbit_vhost.erl index b0350e86..3a1981ad 100644 --- a/src/rabbit_vhost.erl +++ b/src/rabbit_vhost.erl @@ -81,8 +81,9 @@ delete(VHostPath) -> %% eventually the termination of that process. Exchange deletion causes %% notifications which must be sent outside the TX rabbit_log:info("Deleting vhost '~s'~n", [VHostPath]), - [assert_benign(rabbit_amqqueue:delete(Q, false, false)) || - Q <- rabbit_amqqueue:list(VHostPath)], + QDelFun = fun (Q) -> rabbit_amqqueue:delete(Q, false, false) end, + [assert_benign(rabbit_amqqueue:with(Name, QDelFun)) || + #amqqueue{name = Name} <- rabbit_amqqueue:list(VHostPath)], [assert_benign(rabbit_exchange:delete(Name, false)) || #exchange{name = Name} <- rabbit_exchange:list(VHostPath)], R = rabbit_misc:execute_mnesia_transaction( |