Skip to content

Commit

Permalink
Fix #468
Browse files Browse the repository at this point in the history
In background mode, the thread that flushed the memory DB
couldn't be joined because it started before the filesystem
initialization.
  • Loading branch information
astrada committed Jun 23, 2019
1 parent d64dc9e commit 26aa565
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion bin/gdfuse.ml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ let setup_application params =
end else begin
DbCache.reset_clean_shutdown cache;
end;
MemoryCache.start_flush_db_thread cache;
let refresh_token = context |. Context.refresh_token_lens in
if refresh_token = "" then
if client_id = "" || client_secret = "" then
Expand Down
2 changes: 2 additions & 0 deletions src/drive.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,8 @@ let get_metadata () =

let init_filesystem () =
let context = Context.get_ctx () in
let cache = context.Context.cache in
MemoryCache.start_flush_db_thread cache;
let config = context |. Context.config_lens in
let root_folder_id = do_request (get_root_folder_id config) |> fst in
Context.update_ctx (Context.root_folder_id ^= Some root_folder_id)
Expand Down

0 comments on commit 26aa565

Please sign in to comment.