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
这样几行就可以 了