net: after call of {TCP,UDP,IP,Unix}Conn/{TCP,Unix}Listener.File(), the deadline will be ineffective #21862
Comments
I assume you are running on a Unix system. I don't see any way to fix this. Do you have any suggestions? |
I don't understand why here set fd to blocking mode. . |
Is this fixed by |
The issue is the method
|
Change https://golang.org/cl/82915 mentions this issue: |
Also see #24942. |
go/src/net/fd_unix.go
Line 316 in c2f8ed2
in the under demo code:
the first goroutine, listener is not call (*net.TCPListener).File(), it timeout with setDeadline() works fine
the second goroutine, listener call (*net.TCPListener).File(), after that, the timeout don't work
the third goroutine, listener call (*net.TCPListener).File(), but then set it to non-blocking mode, timeout works fine too
The text was updated successfully, but these errors were encountered: