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:
Roy Hill-Percival
2026-11-19 07:57:32 +00:00
committed by GitHub
parent b983473390
commit 1c5a1fbf70
5 changed files with 107 additions and 1 deletions
+5
View File
@@ -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
}