diff --git a/source/common/http/conn_pool_grid.cc b/source/common/http/conn_pool_grid.cc index ba51e7eee7e1..07b9bde9c618 100644 --- a/source/common/http/conn_pool_grid.cc +++ b/source/common/http/conn_pool_grid.cc @@ -191,6 +191,9 @@ void ConnectivityGrid::WrapperCallbacks::cancelAllPendingAttempts( absl::optional ConnectivityGrid::WrapperCallbacks::tryAnotherConnection() { + if (grid_.destroying_) { + return {}; + } absl::optional next_pool = grid_.nextPool(current_); if (!next_pool.has_value()) { // If there are no other pools to try, return an empty optional. @@ -236,10 +239,10 @@ ConnectivityGrid::ConnectivityGrid( ConnectivityGrid::~ConnectivityGrid() { // Ignore idle callbacks while the pools are destroyed below. destroying_ = true; - // Callbacks might have pending streams registered with the pools, so cancel and delete - // the callback before deleting the pools. - wrapped_callbacks_.clear(); + // Make sure to clear the pools (which deletes all active connections, and + // signals callers) before deleting callbacks. pools_.clear(); + wrapped_callbacks_.clear(); } void ConnectivityGrid::deleteIsPending() { diff --git a/tools/base/requirements.txt b/tools/base/requirements.txt index 268f131abcaf..5848d26a062f 100644 --- a/tools/base/requirements.txt +++ b/tools/base/requirements.txt @@ -689,9 +689,9 @@ gitdb==4.0.11 \ --hash=sha256:81a3407ddd2ee8df444cbacea00e2d038e40150acfa3001696fe0dcf1d3adfa4 \ --hash=sha256:bf5421126136d6d0af55bc1e7c1af1c397a34f5b7bd79e776cd3e89785c2b04b # via gitpython -gitpython==3.1.41 \ - --hash=sha256:c36b6634d069b3f719610175020a9aed919421c87552185b085e04fbbdb10b7c \ - --hash=sha256:ed66e624884f76df22c8e16066d567aaa5a37d5b5fa19db2c6df6f7156db9048 +gitpython==3.1.42 \ + --hash=sha256:1bf9cd7c9e7255f77778ea54359e54ac22a72a5b51288c457c881057b7bb9ecd \ + --hash=sha256:2d99869e0fef71a73cbd242528105af1d6c1b108c60dfabd994bf292f76c3ceb # via -r requirements.in google-apitools==0.5.32 \ --hash=sha256:b78f74116558e0476e19501b5b4b2ac7c93261a69c5449c861ea95cbc853c688 \ @@ -700,7 +700,9 @@ google-apitools==0.5.32 \ google-auth[aiohttp]==2.27.0 \ --hash=sha256:8e4bad367015430ff253fe49d500fdc3396c1a434db5740828c728e45bcce245 \ --hash=sha256:e863a56ccc2d8efa83df7a80272601e43487fa9a728a376205c86c26aaefa821 - # via gsutil + # via + # google-auth + # gsutil google-reauth==0.1.1 \ --hash=sha256:cb39074488d74c8853074dde47368bbf8f739d4a4338b89aab696c895b6d8368 \ --hash=sha256:f9f6852a55c2c5453d581cd01f3d1278e86147c03d008409800390a834235892 @@ -1061,6 +1063,7 @@ pyjwt[crypto]==2.8.0 \ # via # gidgethub # pygithub + # pyjwt pylsqpack==0.3.18 \ --hash=sha256:005ddce84bdcbf5c3cf99f764504208e1aa0a91a8331bf47108f2708f2a315e6 \ --hash=sha256:06e1bbe47514b83cd03158e5558ef8cc44f578169c1820098be9f3cc4137f16a \