aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-08-28 12:55:40 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2018-08-28 12:55:40 -0700
commit6076b1d7982b4d0778dd68c236075b5c36b72e0d (patch)
tree1da2c80065a6844ca0480bd83217792cc3185886 /src/core/tsi/ssl/session_cache/ssl_session_cache.cc
parent3f002567c4c1f8cc7542aeee2d60d6d0c4c5dd54 (diff)
parent4b5b019d5644affef122e06c6898811286850b8d (diff)
Merge branch 'channelz-subchannels' into channelz-server
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);