aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/net/sendfile_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/sendfile_linux.go')
-rw-r--r--libgo/go/net/sendfile_linux.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/libgo/go/net/sendfile_linux.go b/libgo/go/net/sendfile_linux.go
index e9ab066..7f51519 100644
--- a/libgo/go/net/sendfile_linux.go
+++ b/libgo/go/net/sendfile_linux.go
@@ -48,23 +48,23 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
if int64(n) > remain {
n = int(remain)
}
- n, errno := syscall.Sendfile(dst, src, nil, n)
+ n, err1 := syscall.Sendfile(dst, src, nil, n)
if n > 0 {
written += int64(n)
remain -= int64(n)
}
- if n == 0 && errno == nil {
+ if n == 0 && err1 == nil {
break
}
- if errno == syscall.EAGAIN && c.wdeadline >= 0 {
+ if err1 == syscall.EAGAIN && c.wdeadline >= 0 {
pollserver.WaitWrite(c)
continue
}
- if errno != nil {
+ if err1 != nil {
// This includes syscall.ENOSYS (no kernel
// support) and syscall.EINVAL (fd types which
// don't implement sendfile together)
- err = &OpError{"sendfile", c.net, c.raddr, errno}
+ err = &OpError{"sendfile", c.net, c.raddr, err1}
break
}
}