Skip to content

Commit

Permalink
Use unique_lock when loading 7TV badges (Chatterino#4402)
Browse files Browse the repository at this point in the history
Co-authored-by: Rasmus Karlsson <[email protected]>
  • Loading branch information
Nerixyz and pajlada authored Feb 22, 2023
1 parent 7e005ba commit a75feba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/providers/seventv/SeventvBadges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit a75feba

Please sign in to comment.