diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/Matrix.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index a48bcdd..4b78978 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1015,6 +1015,7 @@ namespace QuickMedia { //if(next_batch.empty()) // clear_sync_cache_for_new_sync(); + additional_messages_queue.pop_wait(); parse_sync_response(json_root, true); }); @@ -1055,8 +1056,10 @@ namespace QuickMedia { } } - if(next_batch.empty()) + if(next_batch.empty()) { + additional_messages_queue.push(true); clear_sync_cache_for_new_sync(); + } result = parse_sync_response(json_root, false); if(result != PluginResult::OK) { @@ -1137,7 +1140,9 @@ namespace QuickMedia { if(sync_additional_messages_thread.joinable()) { program_kill_in_thread(sync_additional_messages_thread.get_id()); + additional_messages_queue.close(); sync_additional_messages_thread.join(); + additional_messages_queue.restart(); } if(notification_thread.joinable()) { |