]> Cypherpunks repositories - gostls13.git/commit
internal/poll: don't skip empty writes on Windows
authorqmuntal <quimmuntal@gmail.com>
Fri, 28 Mar 2025 09:39:49 +0000 (10:39 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Fri, 28 Mar 2025 16:44:35 +0000 (09:44 -0700)
commit656b5b3abe25d026725edff49edbdaa9862c9d77
treefd6018a51e1d722d1f9365e4f6700fa36984c23c
parente6c2e12c63db5b24724db873009373af413cd1ea
internal/poll: don't skip empty writes on Windows

Empty writes might be important for some protocols. Let Windows decide
what do with them rather than skipping them on our side. This is inline
with the behavior of other platforms.

While here, refactor the Read/Write/Pwrite methods to reduce one
indentation level and make the code easier to read.

Fixes #73084.

Change-Id: Ic5393358e237d53b8be6097cd7359ac0ff205309
Reviewed-on: https://go-review.googlesource.com/c/go/+/661435
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/internal/poll/fd_windows.go
src/internal/poll/fd_windows_test.go
src/internal/syscall/windows/syscall_windows.go