]> Cypherpunks.ru repositories - gostls13.git/commit
all: remove os.ErrTemporary
authorDamien Neil <dneil@google.com>
Wed, 31 Jul 2019 20:13:39 +0000 (13:13 -0700)
committerDamien Neil <dneil@google.com>
Thu, 1 Aug 2019 15:39:45 +0000 (15:39 +0000)
commitea8b0acdac0c542a5cd9249861ddc1c43e9c71ba
treefe469be1da7541ac4d8348492bf5b6cc3a1ff8fc
parent8a317ebc0f50339628c003bf06107cd865406dd4
all: remove os.ErrTemporary

As discussed in
https://github.com/golang/go/issues/32463#issuecomment-506833421
the classification of deadline-based timeouts as "temporary" errors is a
historical accident. I/O timeouts used to be duration-based, so they
really were temporary--retrying a timed-out operation could succeed. Now
that they're deadline-based, timeouts aren't temporary unless you reset
the deadline.

Drop ErrTemporary from Go 1.13, since its definition is wrong. We'll
consider putting it back in Go 1.14 with a clear definition and
deprecate net.OpError.Temporary.

Fixes #32463

Change-Id: I70cda664590d8872541e17409a5780da76920891
Reviewed-on: https://go-review.googlesource.com/c/go/+/188398
Reviewed-by: Jonathan Amsterdam <jba@google.com>
16 files changed:
api/go1.13.txt
src/context/context.go
src/internal/oserror/errors.go
src/internal/oserror/errors_test.go
src/internal/poll/fd.go
src/net/cgo_unix.go
src/net/http/transport.go
src/net/net.go
src/net/pipe.go
src/net/url/url.go
src/os/error.go
src/syscall/syscall_js.go
src/syscall/syscall_nacl.go
src/syscall/syscall_plan9.go
src/syscall/syscall_unix.go
src/syscall/syscall_windows.go