Skip to content

Commit 36f3e67

Browse files
author
Daniil Fedotov
committed
Purge vhost storage in transaction
1 parent 8a45f40 commit 36f3e67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rabbit_vhost.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ delete(VHostPath) ->
9494
with(VHostPath, fun () -> internal_delete(VHostPath) end)),
9595
ok = rabbit_event:notify(vhost_deleted, [{name, VHostPath}]),
9696
[ok = Fun() || Fun <- Funs],
97-
purge_messages(VHostPath),
9897
ok.
9998

10099
purge_messages(VHostPath) ->
@@ -129,6 +128,7 @@ internal_delete(VHostPath) ->
129128
Fs2 = [rabbit_policy:delete(VHostPath, proplists:get_value(name, Info))
130129
|| Info <- rabbit_policy:list(VHostPath)],
131130
ok = mnesia:delete({rabbit_vhost, VHostPath}),
131+
purge_messages(VHostPath),
132132
Fs1 ++ Fs2.
133133

134134
exists(VHostPath) ->

0 commit comments

Comments
 (0)