Skip to content

Commit

Permalink
Change ConnectionPool size to not use an iterator (#3015)
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed May 7, 2024
1 parent 233abcc commit 8921452
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions gems/aws-sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Unreleased Changes
------------------

* Issue - Fix issue where `ConnectionPool` size iteration would prevent a new key from being added to the pool.

3.194.1 (2024-05-03)
------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ def session_for(endpoint, &block)
# pool, not counting those currently in use.
def size
@pool_mutex.synchronize do
size = 0
@pool.each_pair do |endpoint,sessions|
size += sessions.size
end
size
@pool.values.flatten.size
end
end

Expand Down

0 comments on commit 8921452

Please sign in to comment.