nghttpx: Use StringRef for sni_name_

This commit is contained in:
Tatsuhiro Tsujikawa 2016-10-01 15:24:25 +09:00
parent 9ad873fc06
commit 19707aac55
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ MemcachedConnection::MemcachedConnection(const Address *addr,
connectcb, readcb, timeoutcb, this, 0, 0., PROTO_MEMCACHED),
do_read_(&MemcachedConnection::noop),
do_write_(&MemcachedConnection::noop),
sni_name_(sni_name.str()),
sni_name_(sni_name),
connect_blocker_(gen, loop, [] {}, [] {}),
parse_state_{},
addr_(addr),
@ -268,7 +268,7 @@ int MemcachedConnection::tls_handshake() {
auto &tlsconf = get_config()->tls;
if (!tlsconf.insecure &&
ssl::check_cert(conn_.tls.ssl, addr_, StringRef(sni_name_)) != 0) {
ssl::check_cert(conn_.tls.ssl, addr_, sni_name_) != 0) {
connect_blocker_.on_failure();
return -1;
}

View File

@ -135,7 +135,7 @@ private:
std::deque<std::unique_ptr<MemcachedRequest>> sendq_;
std::deque<MemcachedSendbuf> sendbufv_;
std::function<int(MemcachedConnection &)> do_read_, do_write_;
std::string sni_name_;
StringRef sni_name_;
ssl::TLSSessionCache tls_session_cache_;
ConnectBlocker connect_blocker_;
MemcachedParseState parse_state_;