From 66cc19375a1f28aef935065dff2e0ce60007f463 Mon Sep 17 00:00:00 2001 From: Arseny Smirnov Date: Fri, 24 Jul 2020 11:20:53 +0300 Subject: [PATCH] Fix 'Initialize TsList mutex before any TsList.' GitOrigin-RevId: 44030e72b96f2c01726d207cf9effb3953df4c72 --- td/telegram/net/NetQuery.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/td/telegram/net/NetQuery.cpp b/td/telegram/net/NetQuery.cpp index 08ca507ab..1a1f7be7b 100644 --- a/td/telegram/net/NetQuery.cpp +++ b/td/telegram/net/NetQuery.cpp @@ -66,7 +66,8 @@ TsList &NetQuery::get_net_query_list() { static auto init_mutex = [] { TsList::lock().unlock(); // initialize mutex before any NetQuery return true; - }; + }(); + CHECK(init_mutex); static TsList net_query_list; return net_query_list; }