From 980b7ecad55ec69c42ead20f92ba1522e28c094b Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Fri, 9 Aug 2024 00:11:11 -0700 Subject: [PATCH] migrate from TAsyncSSLSocket Summary: `apache::thrift::async::TAsyncSSLSocket` is now just a derived-class wrapper around `folly::AsyncSSLSocket`. Reviewed By: jmswen Differential Revision: D60981967 fbshipit-source-id: 8de104555d4049c3b590f99871e857faf19407aa --- .../lib/network/AsyncTlsToPlaintextSocket.cpp | 16 +++++++--------- mcrouter/lib/network/SocketUtil.cpp | 4 ++-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/mcrouter/lib/network/AsyncTlsToPlaintextSocket.cpp b/mcrouter/lib/network/AsyncTlsToPlaintextSocket.cpp index 6083c688a..63a315d74 100644 --- a/mcrouter/lib/network/AsyncTlsToPlaintextSocket.cpp +++ b/mcrouter/lib/network/AsyncTlsToPlaintextSocket.cpp @@ -18,8 +18,8 @@ #include #include +#include #include -#include namespace facebook { namespace memcache { @@ -50,8 +50,7 @@ class AsyncTlsToPlaintextSocket::ConnectCallback me_.flushWrites(); }; - auto* tlsSocket = - impl->getUnderlyingTransport(); + auto* tlsSocket = impl->getUnderlyingTransport(); CHECK(tlsSocket); // Save state regarding session resumption @@ -116,12 +115,11 @@ void AsyncTlsToPlaintextSocket::connect( folly::SocketOptionMap socketOptions) { auto* const wrappedConnectCallback = new ConnectCallback(*this, connectCallback); - impl_->getUnderlyingTransport() - ->connect( - wrappedConnectCallback, - address, - connectTimeout.count(), - std::move(socketOptions)); + impl_->getUnderlyingTransport()->connect( + wrappedConnectCallback, + address, + connectTimeout.count(), + std::move(socketOptions)); } void AsyncTlsToPlaintextSocket::flushWrites() { diff --git a/mcrouter/lib/network/SocketUtil.cpp b/mcrouter/lib/network/SocketUtil.cpp index 8a416c4ae..9a8af2015 100644 --- a/mcrouter/lib/network/SocketUtil.cpp +++ b/mcrouter/lib/network/SocketUtil.cpp @@ -17,8 +17,8 @@ #include #include +#include #include -#include #include "mcrouter/lib/fbi/cpp/LogFailure.h" #include "mcrouter/lib/network/AsyncTlsToPlaintextSocket.h" @@ -123,7 +123,7 @@ createSocketCommon( folly::AsyncSocket>; using AsyncSSLSocketT = std::conditional_t< CreateThriftFriendlySocket, - apache::thrift::async::TAsyncSSLSocket, + folly::AsyncSSLSocket, folly::AsyncSSLSocket>; using Ptr = folly::AsyncTransportWrapper::UniquePtr;