summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_queue_index.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rabbit_queue_index.erl b/src/rabbit_queue_index.erl
index d780241dbb..29f6f5a733 100644
--- a/src/rabbit_queue_index.erl
+++ b/src/rabbit_queue_index.erl
@@ -656,12 +656,10 @@ get_journal_handle(State = #qistate { journal_handle = Hdl }) ->
%% are 0 to start with.
load_journal(State) ->
case is_journal_present(State) of
- true ->
- {JournalHdl, State1} = get_journal_handle(State),
- {ok, 0} = file_handle_cache:position(JournalHdl, 0),
- load_journal_entries(State1);
- false ->
- State
+ true -> {JournalHdl, State1} = get_journal_handle(State),
+ {ok, 0} = file_handle_cache:position(JournalHdl, 0),
+ load_journal_entries(State1);
+ false -> State
end.
is_journal_present(#qistate { journal_handle = undefined,