Open
Description
Hello guys.
It looks like we have no smart way to check the internal/poll ErrTimeout when we set the deadline on the connection.
The net.Error
interface is not good enough as following
An Error represents a network error.
type Error interface {
error
Timeout() bool // Is the error a timeout?
Temporary() bool // Is the error temporary?
}
The Timeout()
method may mislead caller think it's deadline error if the error is actually caused by sycall.Errno
(e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT
) rather than internal/poll ErrTimeout
Maybe we need a smart way to check the deadline error?
Many thanks in advance:)