diff options
author | Merry <git@mary.rs> | 2022-04-07 20:32:47 +0200 |
---|---|---|
committer | Merry <git@mary.rs> | 2022-04-07 20:44:07 +0200 |
commit | 3cf65933429ba658b05e0aa2bf27552cc4d6f648 (patch) | |
tree | b4e6c5dab8980656996209ff8bbe1590d26a7d3d /src | |
parent | video_core: Replace lock_guard with scoped_lock (diff) | |
download | yuzu-3cf65933429ba658b05e0aa2bf27552cc4d6f648.tar yuzu-3cf65933429ba658b05e0aa2bf27552cc4d6f648.tar.gz yuzu-3cf65933429ba658b05e0aa2bf27552cc4d6f648.tar.bz2 yuzu-3cf65933429ba658b05e0aa2bf27552cc4d6f648.tar.lz yuzu-3cf65933429ba658b05e0aa2bf27552cc4d6f648.tar.xz yuzu-3cf65933429ba658b05e0aa2bf27552cc4d6f648.tar.zst yuzu-3cf65933429ba658b05e0aa2bf27552cc4d6f648.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/web_service/web_backend.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp index 4208bd044..58b0c2f10 100644 --- a/src/web_service/web_backend.cpp +++ b/src/web_service/web_backend.cpp @@ -32,7 +32,7 @@ constexpr std::size_t TIMEOUT_SECONDS = 30; struct Client::Impl { Impl(std::string host, std::string username, std::string token) : host{std::move(host)}, username{std::move(username)}, token{std::move(token)} { - std::lock_guard lock{jwt_cache.mutex}; + std::scoped_lock lock{jwt_cache.mutex}; if (this->username == jwt_cache.username && this->token == jwt_cache.token) { jwt = jwt_cache.jwt; } @@ -147,7 +147,7 @@ struct Client::Impl { if (result.result_code != WebResult::Code::Success) { LOG_ERROR(WebService, "UpdateJWT failed"); } else { - std::lock_guard lock{jwt_cache.mutex}; + std::scoped_lock lock{jwt_cache.mutex}; jwt_cache.username = username; jwt_cache.token = token; jwt_cache.jwt = jwt = result.returned_data; |