Skip to content

Commit

Permalink
reviewer comments
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Wilk <[email protected]>
  • Loading branch information
alyssawilk committed Oct 6, 2020
1 parent 8d27809 commit 557ea5f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/common/tcp_proxy/tcp_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,12 @@ class Filter : public Network::ReadFilter,

std::shared_ptr<UpstreamCallbacks> upstream_callbacks_; // shared_ptr required for passing as a
// read filter.
// The upstream handle (either TCP or HTTP). This is set in onGenericPoolReady and should persist
// until either the upstream or downstream connection is terminated.
std::unique_ptr<GenericUpstream> upstream_;
// The connection pool used to set up |upstream_|.
// This will be non-null from when an upstream connection is attempted until
// it either succeeds or fails.
std::unique_ptr<GenericConnPool> generic_conn_pool_;
RouteConstSharedPtr route_;
Router::MetadataMatchCriteriaConstPtr metadata_match_criteria_;
Expand Down
2 changes: 2 additions & 0 deletions source/common/tcp_proxy/upstream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ void TcpConnPool::onPoolFailure(ConnectionPool::PoolFailureReason reason,
upstream_handle_ = nullptr;
callbacks_->onGenericPoolFailure(reason, host);
}

void TcpConnPool::onPoolReady(Tcp::ConnectionPool::ConnectionDataPtr&& conn_data,
Upstream::HostDescriptionConstSharedPtr host) {
upstream_handle_ = nullptr;
Expand Down Expand Up @@ -233,6 +234,7 @@ void HttpConnPool::onPoolFailure(ConnectionPool::PoolFailureReason reason, absl:
upstream_handle_ = nullptr;
callbacks_->onGenericPoolFailure(reason, host);
}

void HttpConnPool::onPoolReady(Http::RequestEncoder& request_encoder,
Upstream::HostDescriptionConstSharedPtr host,
const StreamInfo::StreamInfo& info) {
Expand Down

0 comments on commit 557ea5f

Please sign in to comment.