-
Notifications
You must be signed in to change notification settings - Fork 4.6k
UDP: Fix removeRay will close a connEntry that not belongs to it #4899
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
Conversation
but this is vulnerable to race conditions: suppose two goroutine run also suppose we have another concurrent goroutine that run suppose goroutine-A and goroutine-B pass now suppose so after running /// I know that the probability of this happening is almost zero, but logically is not zero and it should be taken into account. ///////////////////////////////////////////////////////////////////// also, the I can give a rare example where not doing this would cause problems. and also we should cancel |
第一个可以弄 |
Although it is a rare situation where udpconn is unavailable but outbound-connection is active.
Canceling ctx cause outbound-pending-Dial close immediately after udpconn is unavailable. Although it is a rare situation where udpconn is unavailable but outbound-Dial is still pending. also, if we are in sniffing-state, cause pending-sniffing is closed, and Dial not executed at all. ///////////// as a result, both are for rare situations, but they are possible anyway and should be fixed. |
find in #4897
这样几行就可以 了