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

Immediately release invalid connections in getValidManaged #7218

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

armanbilge
Copy link
Member

@armanbilge armanbilge commented Jul 18, 2023

Fixes #7216.

Previously, if an invalid connection was obtained from the pool, instead of returning it back to the pool so that it could dispose/recycle it, we would continue flatMapping resources until we could obtain a valid connection. Thus we'd retain leases to the invalid connections much longer than necessary, which is problematic when the pool itself has a limited number of slots.

By using a Hotswap we can release the invalid connection immediately before attempting to obtain a new one.

@armanbilge armanbilge changed the title Release borked connections in getValidManaged Immediately release invalid connections in getValidManaged Jul 18, 2023
@armanbilge armanbilge merged commit 92a9deb into http4s:series/0.23 Jul 18, 2023
16 checks passed
@armanbilge armanbilge deleted the issue/7216 branch July 18, 2023 16:53
@armanbilge armanbilge restored the issue/7216 branch July 18, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ember client hangs when remote server idle timeout is shorter than client's
2 participants