Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve the conditions for clearing the Connection Attempt Delay upon connection failure #12223

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

Merged

Conversation

shioimm
Copy link
Contributor

@shioimm shioimm commented Nov 30, 2024

Improve the conditions for clearing the Connection Attempt Delay upon connection failure.

This change addresses a case that was overlooked in #12087.
In the previous change, the Connection Attempt Delay was cleared at the point of a connection failure only if both of the following conditions were met:

  • No other sockets were attempting a connection
  • There were addresses still available to start a new connection

In this update, the second condition has been removed.
As a result, if name resolution succeeds after a connection failure and new addresses are obtained, it will be able to immediately attempt a connection to one of them.

If there are no sockets attempting a connection, no addresses available for connection, and name resolution has completed, an exception will still be raised as before.

Additionally, the following minor fixes have been made:

  • Refactor: Remove unnecessary members

@shioimm shioimm marked this pull request as ready for review November 30, 2024 09:04
… connection failure

This change addresses a case that was overlooked in ruby#12087.
In the previous change, the Connection Attempt Delay was cleared at the point of a connection failure only if both of the following conditions were met:

- No other sockets were attempting a connection
- There were addresses still available to start a new connection

In this update, the second condition has been removed.
As a result, if name resolution succeeds after a connection failure and new addresses are obtained, it will be able to immediately attempt a connection to one of them.

If there are no sockets attempting a connection, no addresses available for connection, and name resolution has completed, an exception will still be raised as before.

Additionally, the following minor fixes have been made:
- Refactor: Remove unnecessary members
@shioimm shioimm force-pushed the improve-for-clearing-connection-attempt-delay branch from 2f5dfd8 to ede9663 Compare November 30, 2024 09:11
@shioimm shioimm merged commit 3d07754 into ruby:master Nov 30, 2024
70 checks passed
@shioimm shioimm deleted the improve-for-clearing-connection-attempt-delay branch December 24, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant