-
Notifications
You must be signed in to change notification settings - Fork 18k
net: lookupIPAddr mapErr causes panic #63927
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
Comments
It's similar to this issue. #60029 |
Ctx is done and then ctx.Error() returns nil. It's a random occurrence in our production environment. we use ip to avoid resolving domain,but this is not a long-term solution. we use custom context,but we can promise the context has no problem. |
That's not a valid implementation of https://pkg.go.dev/context#Context // If Done is closed, Err returns a non-nil error explaining why: Therefore I don't think there's anything to fix on Go's side. |
Sorry, I hit the wrong button closing. Reopening. But I still don't know what we'd fix. |
On the one hand, On the other hand, in general Go APIs do panic if the program violates invariants that are supposed to always hold in a correct program. If you have a |
Thank you for your patient reply. I will colse my issue. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
parse dns domain when send http request
What did you expect to see?
no panic
What did you see instead?
The text was updated successfully, but these errors were encountered: