diff --git a/td/telegram/net/NetQuery.cpp b/td/telegram/net/NetQuery.cpp index 90ad2a8d5..08ca507ab 100644 --- a/td/telegram/net/NetQuery.cpp +++ b/td/telegram/net/NetQuery.cpp @@ -63,6 +63,10 @@ void NetQuery::set_error(Status status, string source) { } TsList &NetQuery::get_net_query_list() { + static auto init_mutex = [] { + TsList::lock().unlock(); // initialize mutex before any NetQuery + return true; + }; static TsList net_query_list; return net_query_list; }