mirror of
https://github.com/golang/go
synced 2024-11-23 21:10:05 -07:00
net: fix inconsistent error values on Read for solaris
Updates #4856. Change-Id: Ia04e24fb1fe57e244d7b1cd417f7f419ad610acd Reviewed-on: https://go-review.googlesource.com/9776 Reviewed-by: Aram Hăvărneanu <aram@mgk.ro>
This commit is contained in:
parent
a77fcb3f8d
commit
9d0a2e4d6e
@ -103,5 +103,8 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
|
|||||||
if lr != nil {
|
if lr != nil {
|
||||||
lr.N = remain
|
lr.N = remain
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
err = os.NewSyscallError("sendfile", err)
|
||||||
|
}
|
||||||
return written, err, written > 0
|
return written, err, written > 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user