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

net: comment for constant not accurate #57672

Open
zen37 opened this issue Jan 7, 2023 · 3 comments
Open

net: comment for constant not accurate #57672

zen37 opened this issue Jan 7, 2023 · 3 comments
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@zen37
Copy link

zen37 commented Jan 7, 2023

What version of Go are you using (go version)?

 go1.19.4 windows/amd64

Does this issue reproduce with the latest release?

Yes (sorry, this is a very insignificant issue, but I could not help it to raise it)

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

https://cs.opensource.google/go/go/+/refs/tags/go1.19.4:src/net/dnsconfig.go

What did you expect to see?

attempts      int           // number of tries before giving up on a query

What did you see instead?

attempts      int           // lost packets before giving up on server
@ianlancetaylor
Copy link
Contributor

Want to send a patch?

@ianlancetaylor ianlancetaylor added Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Jan 8, 2023
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Jan 8, 2023
@mateusz834
Copy link
Contributor

attempts      int           // number of tries before giving up on a query

This is not true either.

for i := 0; i < cfg.attempts; i++ {
for j := uint32(0); j < sLen; j++ {
server := cfg.servers[(serverOffset+j)%sLen]

total attempts is equal to: len(servers) * attempts

@zen37
Copy link
Author

zen37 commented Jan 9, 2023

Want to send a patch?

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants