Skip to content

Commit 03f9d36

Browse files
committed
rabbit_vhosts: Don't reconcile vhosts if rabbit is stopped
[Why] That timer was started during boot and continued regardless if `rabbit` was running or stopped. This caused the reconsiliation to crash if the `rabbit` app was stopped before the it ended because it tried to access the database even though it was stopped or even reset. [How] We just check if `rabbit` is running before running one reconciliation and scheduling a new one.
1 parent 66fd179 commit 03f9d36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/rabbit/src/rabbit_vhosts.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ boot() ->
5151
%% See start_processes_for_all/1.
5252
-spec reconcile() -> 'ok'.
5353
reconcile() ->
54-
case is_reconciliation_enabled() of
54+
case rabbit:is_running() andalso is_reconciliation_enabled() of
5555
false -> ok;
5656
true ->
5757
_ = reconcile_once(),

0 commit comments

Comments
 (0)