diff --git a/td/telegram/Logging.cpp b/td/telegram/Logging.cpp index 71c63417..8b9527b7 100644 --- a/td/telegram/Logging.cpp +++ b/td/telegram/Logging.cpp @@ -24,6 +24,7 @@ #include "td/utils/logging.h" #include "td/utils/misc.h" +#include #include #include @@ -62,6 +63,7 @@ Status Logging::set_current_stream(td_api::object_ptr stream) } TRY_STATUS(file_log.init(file_stream->path_, max_log_file_size)); + std::atomic_thread_fence(std::memory_order_release); // better than nothing log_interface = &ts_log; return Status::OK(); }