mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-22 23:13:01 +00:00
Fix udp goroutine leak
v.conn.link.Reader is a pipe.Reader, doesn't implement Close(), it will fail assertion and cause the pipe to be left open It can be fixed by using Interrupt()
This commit is contained in:
parent
73c5650b17
commit
89074a14b6
@ -45,7 +45,7 @@ func (v *Dispatcher) RemoveRay() {
|
|||||||
v.Lock()
|
v.Lock()
|
||||||
defer v.Unlock()
|
defer v.Unlock()
|
||||||
if v.conn != nil {
|
if v.conn != nil {
|
||||||
common.Close(v.conn.link.Reader)
|
common.Interrupt(v.conn.link.Reader)
|
||||||
common.Close(v.conn.link.Writer)
|
common.Close(v.conn.link.Writer)
|
||||||
v.conn = nil
|
v.conn = nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user