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

Add max wait for connection borrowing in pool manager #681

Open
wants to merge 1 commit into
base: series/0.23
Choose a base branch
from

Conversation

danicheg
Copy link
Member

Closes #654. Transferred from http4s/http4s#6387.

@rossabaker rossabaker changed the base branch from main to series/0.23 May 26, 2022 02:51
case None if maxConnectionsPerRequestKey(key) <= 0 =>
F.delay(callback(Left(NoConnectionAllowedException(key))))

case None if curTotal == maxTotal =>

Choose a reason for hiding this comment

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

Just a minor thing that comes to mind: what if we added a guard clause here like

Suggested change
case None if curTotal == maxTotal =>
case None if curTotal == maxTotal && idleQueues.keys.nonEmpty =>

so to expunge the else branch on line 267 on, and make the match branch on line 275 to become
case _ =>
to take care of that?

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.

Consider a max wait in pool manager
2 participants