Skip to content

[3.0] Respect attempts and timeout from resolv.conf - #231

Open
WyriHaximus wants to merge 3 commits into
reactphp:3.xfrom
WyriHaximus-labs:3.x-respect-attempts-and-timeout-from-resolv.conf
Open

[3.0] Respect attempts and timeout from resolv.conf#231
WyriHaximus wants to merge 3 commits into
reactphp:3.xfrom
WyriHaximus-labs:3.x-respect-attempts-and-timeout-from-resolv.conf

Conversation

@WyriHaximus

@WyriHaximusWyriHaximus commented Feb 22, 2025

Copy link
Copy Markdown
Member

The commits in this PR add representation, parsing, and utilisation of attempts and timeout options from resolv.conf.
Based on https://man7.org/linux/man-pages/man5/resolv.conf.5.html the limits for both options have been silently capped, and for both, the assumption is made that the lowest possible value is 1.

Builds the foundation for #231 that will implement #158. Building on top of #187, #179, #180, and many others.

@WyriHaximusWyriHaximus added this to the v3.0.0 milestone Feb 22, 2025
@WyriHaximusWyriHaximus changed the title [3.0] Respect attempts and timeout from resolv.conf[3.0] Respect attempts and timeout from resolv.confJul 9, 2025
@WyriHaximus
WyriHaximusforce-pushed the 3.x-respect-attempts-and-timeout-from-resolv.conf branch from d75f553 to c78b412CompareJuly 9, 2025 05:44
…options
The two current supported options, `attempts` and `timeout`, have their min (assumed to be `1`), max, and default value as specified on https://man7.org/linux/man-pages/man5/resolv.conf.5.html set.
Adding parsing logic to the `Config` class that respects values as specified on https://man7.org/linux/man-pages/man5/resolv.conf.5.html in such a way we can easily expand the list to add `search`, `ndots`, and more in follow up PRs. As per https://man7.org/linux/man-pages/man5/resolv.conf.5.html both values are silently capped and are not allowed to go below 1.
@WyriHaximus
WyriHaximusforce-pushed the 3.x-respect-attempts-and-timeout-from-resolv.conf branch from df07956 to 71837b3CompareJuly 25, 2025 05:45
While setting up the executors we will now use the `Options` class to pass in formally hardcoded values. This won't impact current behavior unless `resolv.conf` other than default values.
A small note is added to the readme documenting the behavior introduced in this PR.
@WyriHaximus
WyriHaximusforce-pushed the 3.x-respect-attempts-and-timeout-from-resolv.conf branch from 71837b3 to 766ba63CompareJuly 25, 2025 05:54
@WyriHaximus
WyriHaximus marked this pull request as ready for review July 25, 2025 05:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@WyriHaximus