Skip to content

Commit

Permalink
net: fix zero-byte payload bug in WriteTo() for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
silbinarywolf committed Sep 2, 2018
1 parent 79faa7a commit 2ab0559
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/internal/poll/fd_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,6 @@ func (fd *FD) Writev(buf *[][]byte) (int64, error) {

// WriteTo wraps the sendto network call.
func (fd *FD) WriteTo(buf []byte, sa syscall.Sockaddr) (int, error) {
if len(buf) == 0 {
return 0, nil
}
if err := fd.writeLock(); err != nil {
return 0, err
}
Expand Down
2 changes: 0 additions & 2 deletions src/net/udpsock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ func TestUDPZeroBytePayload(t *testing.T) {
switch runtime.GOOS {
case "nacl", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
case "windows":
t.Skipf("zero byte payload is broken on %s. See Github Issue #26668.", runtime.GOOS)
}

c, err := newLocalPacketListener("udp")
Expand Down

0 comments on commit 2ab0559

Please sign in to comment.