diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-05-20 17:56:36 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-05-20 17:56:36 +0200 |
commit | 50d779833e4457f5a2bed788d4048939db8e9fe7 (patch) | |
tree | 92e87fdb3573c423223ebdd9454d3128e404c265 /rwcancel/rwcancel.go | |
parent | a9b377e9e10eb5194c0bdff32136c11b17253bfd (diff) |
rwcancel: use ordinary os.ErrClosed instead of custom error
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'rwcancel/rwcancel.go')
-rw-r--r-- | rwcancel/rwcancel.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rwcancel/rwcancel.go b/rwcancel/rwcancel.go index 05484e1..5dff446 100644 --- a/rwcancel/rwcancel.go +++ b/rwcancel/rwcancel.go @@ -89,7 +89,7 @@ func (rw *RWCancel) Read(p []byte) (n int, err error) { return n, err } if !rw.ReadyRead() { - return 0, errors.New("fd closed") + return 0, os.ErrClosed } } } @@ -101,7 +101,7 @@ func (rw *RWCancel) Write(p []byte) (n int, err error) { return n, err } if !rw.ReadyWrite() { - return 0, errors.New("fd closed") + return 0, os.ErrClosed } } } |