1
0
mirror of https://github.com/fumiama/water.git synced 2026-06-29 00:10:25 +08:00

use blocking mode pre-go1.11

This commit is contained in:
Song Gao
2019-03-31 15:42:28 -07:00
parent 240a3d7b51
commit 3fe638a7bf
13 changed files with 132 additions and 95 deletions

10
syscalls_darwin_legacy.go Normal file
View File

@@ -0,0 +1,10 @@
// +build darwin,!go1.11
package water
func setNonBlock(fd int) error {
// There's a but pre-go1.11 that causes 'resource temporarily unavailable'
// error in non-blocking mode. So just skip it here. Close() won't be able
// to unblock a pending read, but that's better than being broken.
return nil
}