-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add a IP addr in this error for locating issues faster? #732
Comments
The problem is that we can't really add it to the error as that would change the API. If we make the error dynamic doing Anyone have any suggestions on how to put this in there? |
a possible path is
// see https://golang.org/src/net/net.go?s=17034:17068#L539
type DailTimeoutError struct {
Err string
Addr string
}
func (e *DailTimeoutError) Error() string {
if e == nil {
return "<nil>"
}
s := e.Err
if e.Addr != "" {
s = "dialing to the given TCP address " + e.Addr + ": " + s
}
return s
}
func (e *DailTimeoutError) Timeout() bool { return true}
func (e *DailTimeoutError) Temporary() bool { return true}
var ErrDialTimeout = &DailTimeoutError{Err: "dialing to the given TCP address timed out"}
|
@phuslu that would still break for users who currently do |
This would break the existing API design, but could be possible when Fasthttp moves to an organization |
fasthttp/tcpdialer.go
Line 365 in 03813ae
usually, dialing a host, that resovle to mullti ips. and If include the IP information in this
ErrDialTimeout
, we can know which server is the problem faster.The text was updated successfully, but these errors were encountered: