Skip to content

Commit

Permalink
Back out "Manage RevproxyController lifetime with shared_ptr"
Browse files Browse the repository at this point in the history
Reviewed By: jano

Differential Revision: D49715876

fbshipit-source-id: 46ebcf7b24c54f8bd9370bd363d7d5e5bf710632
  • Loading branch information
WizKid authored and facebook-github-bot committed Sep 28, 2023
1 parent d150845 commit 8eee8ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions proxygen/lib/http/session/HTTPSessionAcceptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ HTTPSessionAcceptor::HTTPSessionAcceptor(
std::shared_ptr<HTTPCodecFactory> codecFactory)
: HTTPAcceptor(accConfig),
codecFactory_(codecFactory),
simpleController_(std::make_shared<SimpleController>(this)) {
simpleController_(this) {
if (!codecFactory_) {
codecFactory_ =
std::make_shared<HTTPDefaultSessionCodecFactory>(accConfig_);
Expand Down Expand Up @@ -98,7 +98,7 @@ void HTTPSessionAcceptor::onNewConnection(folly::AsyncTransport::UniquePtr sock,
std::move(sock),
localAddress,
*peerAddress,
controller.get(),
controller,
std::move(codec),
tinfo,
sessionInfoCb);
Expand Down
6 changes: 3 additions & 3 deletions proxygen/lib/http/session/HTTPSessionAcceptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ class HTTPSessionAcceptor
* override this function to provide their own more sophisticated
* controller here.
*/
virtual std::shared_ptr<HTTPSessionController> getController() {
return simpleController_;
virtual HTTPSessionController* getController() {
return &simpleController_;
}

HTTPSessionStats* downstreamSessionStats_{nullptr};
Expand Down Expand Up @@ -136,7 +136,7 @@ class HTTPSessionAcceptor

std::shared_ptr<HTTPCodecFactory> codecFactory_{};

std::shared_ptr<SimpleController> simpleController_;
SimpleController simpleController_;

HTTPSession::InfoCallback* sessionInfoCb_{nullptr};

Expand Down

0 comments on commit 8eee8ac

Please sign in to comment.