mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-26 19:41:44 +00:00
TUN inbound: End UDP flows and cancel dispatches when the inbound closes (#7350)
https://github.com/XTLS/Xray-core/pull/7350#pullrequestreview-5901009138
This commit is contained in:
@@ -148,6 +148,11 @@ func (s *stack) Close() error {
|
||||
for _, u := range sockets {
|
||||
u.queue.close()
|
||||
}
|
||||
// the UDP flows the other side opened are in neither conns nor sockets; end them too, or their
|
||||
// dispatches and what they hold survive the instance
|
||||
if s.udp != nil {
|
||||
s.udp.closeAll()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user