diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-11 03:21:02 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-11 03:21:02 +0100 |
commit | 01636191bc8ee0a109a50ca9441f01a14d273a02 (patch) | |
tree | 07b08e6aed9902d3d8fece301e31d7c178db9cae /src/plugins | |
parent | dd3da1832c0103a2da35df8ac2483461311bdf25 (diff) |
Matrix: do not save to sync file on error
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index d6034de..ce003a0 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1099,12 +1099,8 @@ namespace QuickMedia { } #endif - sync_end: - if(sync_running) - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - // TODO: Circulate file - FILE *sync_cache_file = fopen(matrix_cache_dir.data.c_str(), initial_sync ? "wb" : "ab"); + sync_cache_file = fopen(matrix_cache_dir.data.c_str(), initial_sync ? "wb" : "ab"); initial_sync = false; if(sync_cache_file) { if(json_root.IsObject()) { @@ -1116,6 +1112,10 @@ namespace QuickMedia { } fclose(sync_cache_file); } + + sync_end: + if(sync_running) + std::this_thread::sleep_for(std::chrono::milliseconds(500)); } }); } |