Use unique_lock when loading 7TV badges (#4402)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2023-02-22 13:01:47 +01:00
committed by GitHub
parent 7e005ba661
commit a75feba4ca
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -4,6 +4,7 @@
- Minor: Delete all but the last 5 crashdumps on application start. (#4392)
- Bugfix: Fixed uploaded AppImage not being able most web requests. (#4400)
- Bugfix: Fixed a potential race condition due to using the wrong lock when loading 7TV badges. (#4402)
- Dev: Add capability to build Chatterino with Qt6. (#4393)
- Dev: Fix homebrew update action. (#4394)
+1 -1
View File
@@ -45,7 +45,7 @@ void SeventvBadges::loadSeventvBadges()
.onSuccess([this](const NetworkResult &result) -> Outcome {
auto root = result.parseJson();
std::shared_lock lock(this->mutex_);
std::unique_lock lock(this->mutex_);
int index = 0;
for (const auto &jsonBadge : root.value("badges").toArray())