mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2024-11-27 17:53:08 +01:00
rwcancel: use ordinary os.ErrClosed instead of custom error
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
a9b377e9e1
commit
50d779833e
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user