diff options
| -rw-r--r-- | src/rabbit_msg_store.erl | 10 | ||||
| -rw-r--r-- | src/rabbit_variable_queue.erl | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/rabbit_msg_store.erl b/src/rabbit_msg_store.erl index 611c2ce031..7eb0b34c40 100644 --- a/src/rabbit_msg_store.erl +++ b/src/rabbit_msg_store.erl @@ -576,7 +576,7 @@ client_read3(#msg_location { guid = Guid, file = File }, Defer, case index_lookup(Guid, CState) of #msg_location { file = File } = MsgLocation -> %% Still the same file. - CState1 = close_all_indicated(CState), + {ok, CState1} = close_all_indicated(CState), %% We are now guaranteed that the mark_handle_open %% call will either insert_new correctly, or will %% fail, but find the value is open, not close. @@ -1266,10 +1266,10 @@ close_all_indicated(#client_msstate { file_handles_ets = FileHandlesEts, client_ref = Ref } = CState) -> Objs = ets:match_object(FileHandlesEts, {{Ref, '_'}, close}), - lists:foldl(fun ({Key = {_Ref, File}, close}, CStateM) -> - true = ets:delete(FileHandlesEts, Key), - close_handle(File, CStateM) - end, CState, Objs). + {ok, lists:foldl(fun ({Key = {_Ref, File}, close}, CStateM) -> + true = ets:delete(FileHandlesEts, Key), + close_handle(File, CStateM) + end, CState, Objs)}. close_all_handles(CState = #client_msstate { file_handles_ets = FileHandlesEts, file_handle_cache = FHC, diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 4d56e48b22..3da5d6ae43 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -967,7 +967,7 @@ msg_store_sync(MSCState, IsPersistent, Guids, Callback) -> msg_store_close_fds(MSCState, IsPersistent) -> with_msg_store_state( MSCState, IsPersistent, - fun (MSCState1) -> {ok, rabbit_msg_store:close_all_indicated(MSCState1)} end). + fun (MSCState1) -> rabbit_msg_store:close_all_indicated(MSCState1) end). msg_store_close_fds_fun(IsPersistent) -> Self = self(), |
