Bottleneck clear should wait instead of try

This commit is contained in:
Lauri Kasanen 2021-08-02 13:56:54 +03:00
parent f57e6e644b
commit e208d5bb5f

View File

@ -111,7 +111,7 @@ void GetAPIMessager::mainUpdateBottleneckStats(const char userid[], const char s
} }
void GetAPIMessager::mainClearBottleneckStats(const char userid[]) { void GetAPIMessager::mainClearBottleneckStats(const char userid[]) {
if (pthread_mutex_trylock(&statMutex)) if (pthread_mutex_lock(&statMutex))
return; return;
bottleneckStats.erase(userid); bottleneckStats.erase(userid);