i/o timeout is not the same as context.DeadlineExceeded
This commit is contained in:
parent
11e50a6022
commit
5c5643749e
1 changed files with 2 additions and 4 deletions
|
@ -109,10 +109,8 @@ func TrackError(direction string, e error) (shouldLog bool) { // shouldLog is a
|
|||
err := ee.Wrap(e, 0)
|
||||
errType := errOther
|
||||
//name := err.TypeName()
|
||||
if errors.Is(e, context.DeadlineExceeded) {
|
||||
errType = errIOTimeout
|
||||
} else if strings.Contains(err.Error(), "i/o timeout") { // hit a read or write deadline
|
||||
log.Warnln("i/o timeout is not the same as context.DeadlineExceeded")
|
||||
if strings.Contains(err.Error(), "i/o timeout") { // hit a read or write deadline
|
||||
//log.Warnln("i/o timeout is not the same as context.DeadlineExceeded")
|
||||
errType = errIOTimeout
|
||||
} else if errors.Is(e, syscall.ECONNRESET) {
|
||||
errType = errConnReset
|
||||
|
|
Loading…
Reference in a new issue