Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[conn_pool] fix use after free in H/1 connection pool #14220

Merged
merged 17 commits into from
Dec 8, 2020
6 changes: 3 additions & 3 deletions source/common/conn_pool/conn_pool_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ class ConnPoolImplBase : protected Logger::Loggable<Logger::Id::pool> {
// Clients that are not ready to handle additional streams because they are CONNECTING.
std::list<ActiveClientPtr> connecting_clients_;

void onUpstreamReady();
Event::SchedulableCallbackPtr upstream_ready_cb_;

private:
std::list<PendingStreamPtr> pending_streams_;

Expand All @@ -253,6 +250,9 @@ class ConnPoolImplBase : protected Logger::Loggable<Logger::Id::pool> {
// The number of streams that can be immediately dispatched
// if all CONNECTING connections become connected.
uint32_t connecting_stream_capacity_{0};

void onUpstreamReady();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Usual ordering of elements in the private section according to style guide is:

  • classes/structs
  • functions
  • data members

Event::SchedulableCallbackPtr upstream_ready_cb_;
};

} // namespace ConnectionPool
Expand Down