2 Commits

Author SHA1 Message Date
Guillaume J. Charmes
219f7e0db9 Add more test helpers, cleanup existing tests. Add editorconfig and golangci config, comply with golangci rules. 2023-10-31 10:52:38 -04:00
Vitaly Potyarkin
291695431f Do not set file descriptor into blocking mode
(*os.File).Fd() implicitly sets file descriptor into blocking mode [1], [2]
We avoid that by calling (*os.File).SyscallConn instead.
This method was added in go1.12 (released on 2019-02-25)

[1]: https://pkg.go.dev/os#File.Fd
[2]: https://cs.opensource.google/go/go/+/refs/tags/go1.20.3:src/os/file_unix.go;l=80-87
2023-04-28 09:24:09 +00:00