diff options
| author | 2018-09-17 14:28:58 -0400 | |
|---|---|---|
| committer | 2018-10-02 15:30:48 +0200 | |
| commit | 62f9409ba3e114b40b6923808290c02bf5af3d2c (patch) | |
| tree | b628db116034f811d0b55b8d8384bd704f80aa18 /src/web_service/web_backend.h | |
| parent | Address more review comments (diff) | |
| download | yuzu-62f9409ba3e114b40b6923808290c02bf5af3d2c.tar.gz yuzu-62f9409ba3e114b40b6923808290c02bf5af3d2c.tar.xz yuzu-62f9409ba3e114b40b6923808290c02bf5af3d2c.zip | |
web_backend: protect jwt cache with a mutex
Diffstat (limited to '')
| -rw-r--r-- | src/web_service/web_backend.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web_service/web_backend.h b/src/web_service/web_backend.h index 549bcce29..d75fbcc15 100644 --- a/src/web_service/web_backend.h +++ b/src/web_service/web_backend.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <functional> | 7 | #include <functional> |
| 8 | #include <future> | 8 | #include <mutex> |
| 9 | #include <string> | 9 | #include <string> |
| 10 | #include <tuple> | 10 | #include <tuple> |
| 11 | #include <httplib.h> | 11 | #include <httplib.h> |
| @@ -81,6 +81,7 @@ private: | |||
| 81 | std::unique_ptr<httplib::Client> cli; | 81 | std::unique_ptr<httplib::Client> cli; |
| 82 | 82 | ||
| 83 | struct JWTCache { | 83 | struct JWTCache { |
| 84 | std::mutex mutex; | ||
| 84 | std::string username; | 85 | std::string username; |
| 85 | std::string token; | 86 | std::string token; |
| 86 | std::string jwt; | 87 | std::string jwt; |