xtaci / kcp-go

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

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

Open blinkbean opened 12 months ago

blinkbean commented 12 months ago

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

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

image