aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/tsi/ssl/session_cache/ssl_session_cache.cc')
-rw-r--r--src/core/tsi/ssl/session_cache/ssl_session_cache.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
index fe4f83a13d..ce74fde343 100644
--- a/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
+++ b/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
@@ -18,9 +18,9 @@
#include <grpc/support/port_platform.h>
-#include "src/core/tsi/ssl/session_cache/ssl_session_cache.h"
-
+#include "src/core/lib/gprpp/mutex_lock.h"
#include "src/core/tsi/ssl/session_cache/ssl_session.h"
+#include "src/core/tsi/ssl/session_cache/ssl_session_cache.h"
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -97,7 +97,7 @@ SslSessionLRUCache::~SslSessionLRUCache() {
}
size_t SslSessionLRUCache::Size() {
- grpc_core::mu_guard guard(&lock_);
+ grpc_core::MutexLock lock(&lock_);
return use_order_list_size_;
}
@@ -117,7 +117,7 @@ SslSessionLRUCache::Node* SslSessionLRUCache::FindLocked(
}
void SslSessionLRUCache::Put(const char* key, SslSessionPtr session) {
- grpc_core::mu_guard guard(&lock_);
+ grpc_core::MutexLock lock(&lock_);
Node* node = FindLocked(grpc_slice_from_static_string(key));
if (node != nullptr) {
node->SetSession(std::move(session));
@@ -140,7 +140,7 @@ void SslSessionLRUCache::Put(const char* key, SslSessionPtr session) {
}
SslSessionPtr SslSessionLRUCache::Get(const char* key) {
- grpc_core::mu_guard guard(&lock_);
+ grpc_core::MutexLock lock(&lock_);
// Key is only used for lookups.
grpc_slice key_slice = grpc_slice_from_static_string(key);
Node* node = FindLocked(key_slice);