aboutsummaryrefslogtreecommitdiff
path: root/src/internal/poll/sendfile_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/poll/sendfile_windows.go')
-rw-r--r--src/internal/poll/sendfile_windows.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal/poll/sendfile_windows.go b/src/internal/poll/sendfile_windows.go
index 2bdfecf013..e0bb1ae182 100644
--- a/src/internal/poll/sendfile_windows.go
+++ b/src/internal/poll/sendfile_windows.go
@@ -68,8 +68,10 @@ func SendFile(fd *FD, src uintptr, size int64) (written int64, err error, handle
chunkSize = size
}
- fd.setOffset(startpos + written)
n, err := fd.execIO('w', func(o *operation) (uint32, error) {
+ off := startpos + written
+ o.o.OffsetHigh = uint32(off >> 32)
+ o.o.Offset = uint32(off)
err := syscall.TransmitFile(fd.Sysfd, hsrc, uint32(chunkSize), 0, &o.o, nil, syscall.TF_WRITE_BEHIND)
if err != nil {
return 0, err