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 | 63dcc9f6be8a3a76772fd6a24fcad36e9e48266d (patch) | |
| tree | 3aa703130236c2d650d99b01fd7a9b10df149f08 /src | |
| parent | b6658c32427ca90f0b63bcced03ea158ef412e94 (diff) | |
| download | rabbitmq-server-git-63dcc9f6be8a3a76772fd6a24fcad36e9e48266d.tar.gz | |
handle amqqueue:delete errors gracefully
Diffstat (limited to 'src')
| -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 b0350e86a8..3a1981ad23 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( |
