Skip to content

Commit

Permalink
Migrate dynamic-cast from TAsyncSSLSocket
Browse files Browse the repository at this point in the history
Summary: [Mcrouter] Migrate `dynamic_cast`s from `TAsyncSSLSocket` to `folly::AsyncSSLSocket`.

Reviewed By: Gownta

Differential Revision: D22118708

fbshipit-source-id: 8e68ab24df7d26703d253c478999b6741134cd51
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Jul 29, 2024
1 parent c18055d commit 40d5a99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mcrouter/lib/network/AsyncTlsToPlaintextSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/AsyncTransport.h>

#include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/AsyncSocket.h>
#include <thrift/lib/cpp/async/TAsyncSSLSocket.h>

#include "mcrouter/lib/network/McSSLUtil.h"

Expand Down Expand Up @@ -221,9 +221,7 @@ class AsyncTlsToPlaintextSocket final : public folly::AsyncTransportWrapper {
explicit AsyncTlsToPlaintextSocket(
folly::AsyncTransportWrapper::UniquePtr impl)
: impl_(std::move(impl)), evb_(*impl_->getEventBase()) {
DCHECK(
dynamic_cast<apache::thrift::async::TAsyncSSLSocket*>(impl_.get()) !=
nullptr);
DCHECK(dynamic_cast<folly::AsyncSSLSocket*>(impl_.get()) != nullptr);
}

void flushWrites();
Expand Down

0 comments on commit 40d5a99

Please sign in to comment.