File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -946,11 +946,13 @@ func (fd *FD) RawWrite(f func(uintptr) bool) error {
946
946
return err
947
947
}
948
948
defer fd .writeUnlock ()
949
- for {
950
- if f (uintptr (fd .Sysfd )) {
951
- return nil
952
- }
949
+
950
+ if f (uintptr (fd .Sysfd )) {
951
+ return nil
953
952
}
953
+
954
+ // TODO(tmm1): find a way to detect socket writability
955
+ return syscall .EWINDOWS
954
956
}
955
957
956
958
func sockaddrToRaw (sa syscall.Sockaddr ) (unsafe.Pointer , int32 , error ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ import (
9
9
"syscall"
10
10
)
11
11
12
+ // BUG(tmm1): On Windows, the Write method of syscall.RawConn
13
+ // does not integrate with the runtime's network poller. It cannot
14
+ // wait for the connection to become writeable, and does not respect
15
+ // deadlines. If the user-provided callback returns false, the Write
16
+ // method will fail immediately.
17
+
12
18
// BUG(mikio): On NaCl and Plan 9, the Control, Read and Write methods
13
19
// of syscall.RawConn are not implemented.
14
20
You can’t perform that action at this time.
0 commit comments