xtaci / kcp-go

A Crypto-Secure Reliable-UDP Library for golang with FEC
MIT License
4.12k stars 737 forks source link

只能通过UDPSession.Close才能跳出readloop循环,如果通过调用SetXXXDeadline的方式,会造成协程泄露。 #250

Open blinkbean opened 1 year ago

blinkbean commented 1 year ago

// ctl.tunnel is UDPSession ctl.tunnel.SetReadDeadline(time.Now().Add(1 * time.Millisecond))

调用SetReadDeadline,对应的readloop导致泄露

image