-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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: