diff --git a/proxygen/lib/http/session/HTTPSessionAcceptor.cpp b/proxygen/lib/http/session/HTTPSessionAcceptor.cpp index 4dd1b9a288..fd025cdafd 100644 --- a/proxygen/lib/http/session/HTTPSessionAcceptor.cpp +++ b/proxygen/lib/http/session/HTTPSessionAcceptor.cpp @@ -30,7 +30,7 @@ HTTPSessionAcceptor::HTTPSessionAcceptor( std::shared_ptr codecFactory) : HTTPAcceptor(accConfig), codecFactory_(codecFactory), - simpleController_(std::make_shared(this)) { + simpleController_(this) { if (!codecFactory_) { codecFactory_ = std::make_shared(accConfig_); @@ -98,7 +98,7 @@ void HTTPSessionAcceptor::onNewConnection(folly::AsyncTransport::UniquePtr sock, std::move(sock), localAddress, *peerAddress, - controller.get(), + controller, std::move(codec), tinfo, sessionInfoCb); diff --git a/proxygen/lib/http/session/HTTPSessionAcceptor.h b/proxygen/lib/http/session/HTTPSessionAcceptor.h index 9c5cadda54..b2c1415e43 100644 --- a/proxygen/lib/http/session/HTTPSessionAcceptor.h +++ b/proxygen/lib/http/session/HTTPSessionAcceptor.h @@ -100,8 +100,8 @@ class HTTPSessionAcceptor * override this function to provide their own more sophisticated * controller here. */ - virtual std::shared_ptr getController() { - return simpleController_; + virtual HTTPSessionController* getController() { + return &simpleController_; } HTTPSessionStats* downstreamSessionStats_{nullptr}; @@ -136,7 +136,7 @@ class HTTPSessionAcceptor std::shared_ptr codecFactory_{}; - std::shared_ptr simpleController_; + SimpleController simpleController_; HTTPSession::InfoCallback* sessionInfoCb_{nullptr};