Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: io.CopyN fails to copy from file to net.Conn on Windows [1.10 backport] #27419

Closed
FiloSottile opened this issue Aug 31, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@FiloSottile
Copy link
Member

commented Aug 31, 2018

@rasky requested issue #25722 to be considered for backport to the next 1.10 minor release.

It's broken on Windows 10 and workarounds are difficult if the CopyN call happens deep into some networking library.

@gopherbot

This comment has been minimized.

Copy link

commented Nov 1, 2018

Change https://golang.org/cl/146779 mentions this issue: [release-branch.go1.10] internal/poll: advance file position in windows sendfile

gopherbot pushed a commit that referenced this issue Nov 1, 2018

[release-branch.go1.10] internal/poll: advance file position in windo…
…ws sendfile

Some versions of Windows (Windows 10 1803) do not set file
position after TransmitFile completes. So just use Seek
to set file position before returning from sendfile.

Updates #25722
Fixes #27419

Change-Id: I7a49be10304b5db19dda707b13ac93d338aeb190
Reviewed-on: https://go-review.googlesource.com/131976
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 8359b5e)
Reviewed-on: https://go-review.googlesource.com/c/146779
Run-TryBot: Ian Lance Taylor <iant@golang.org>
@gopherbot

This comment has been minimized.

Copy link

commented Nov 1, 2018

Closed by merging 13a2f53 to release-branch.go1.10.

@gopherbot gopherbot closed this Nov 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.