]> Cypherpunks repositories - gostls13.git/commit
net: map context errors from aborted dial to internal net package errors
authorBen Burkert <ben@benburkert.com>
Thu, 29 Mar 2018 22:04:58 +0000 (15:04 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 29 Mar 2018 23:39:53 +0000 (23:39 +0000)
commit72b0fb5153765fef92290a7c3eb816201bbd20fd
treea6dfdf96a89f8d355b4f21b557095ab926853230
parentdfd7f3562645ebd587d7d883bbaa8915fcf8c84b
net: map context errors from aborted dial to internal net package errors

Map the error returned when a dial is aborted from the context package
error to the internal net package error. For example, context.Canceled
errors map to errCanceled, and context.DeadlineExceeded errors map to
poll.ErrTimeout.

Fixes #23648

Change-Id: Idf9d3d08052d540740c0b054503aaed931dc5b1e
Reviewed-on: https://go-review.googlesource.com/103518
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/dial_unix_test.go
src/net/fd_unix.go