Initialize TsList mutex before any TsList.

GitOrigin-RevId: 598e90b812e538288b3c2d60195cce68235d89a6
This commit is contained in:
levlam 2020-07-23 21:07:19 +03:00
parent a02f8d610d
commit c18a2474c6

View File

@ -63,6 +63,10 @@ void NetQuery::set_error(Status status, string source) {
}
TsList<NetQueryDebug> &NetQuery::get_net_query_list() {
static auto init_mutex = [] {
TsList<NetQueryDebug>::lock().unlock(); // initialize mutex before any NetQuery
return true;
};
static TsList<NetQueryDebug> net_query_list;
return net_query_list;
}