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 · 4 comments · May be fixed by #57806
Open

net: comment for constant not accurate #57672

zen37 opened this issue Jan 7, 2023 · 4 comments · May be fixed by #57806
Labels
Documentation help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@zen37
Copy link
Contributor

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
Member

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
Contributor Author

zen37 commented Jan 9, 2023

Want to send a patch?

yes

@Ja7ad Ja7ad linked a pull request Jan 16, 2023 that will close this issue
Ja7ad added a commit to Ja7ad/go that referenced this issue Jan 17, 2023
@gopherbot
Copy link

Change https://go.dev/cl/462040 mentions this issue: net: update comment attempts query

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

Successfully merging a pull request may close this issue.

4 participants