Skip to content

Conversation

@mmatczuk
Copy link
Contributor

@mmatczuk mmatczuk commented Dec 6, 2024

Fixes #706

@mmatczuk mmatczuk requested a review from Choraden as a code owner December 6, 2024 13:06
net.go Outdated
Comment on lines 72 to 84
Retry: 3,
RetryBackoff: 1 * time.Second,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not belong here.

Add retry config and implementation in Dialer.
Also, add test harness for dialing errors.
net.go:186:2: for loop can be changed to use an integer range (Go 1.22+) (intrange)
        for i := 0; i < attempts; i++ {
    --http-dial-attempts <int> (default 3) (env FORWARDER_HTTP_DIAL_ATTEMPTS)
        The number of attempts to dial the network address.

    --http-dial-backoff <duration> (default 1s) (env FORWARDER_HTTP_DIAL_BACKOFF)
        The amount of time to wait between dial attempts.
@mmatczuk mmatczuk merged commit 4440c9e into main Dec 6, 2024
6 checks passed
@mmatczuk mmatczuk deleted the mmt/dial_retry branch December 6, 2024 15:21
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.

net: dial retries

3 participants