1
0
mirror of https://github.com/MetaCubeX/mihomo.git synced 2026-10-10 12:13:10 +08:00

fix: avoid VLESS decryption cleanup panic (#3195)

This commit is contained in:
浅小沫
2026-09-10 07:22:33 +08:00
committed by GitHub
parent d5f57a5e29
commit 20bcda2d1a
+2 -2
View File
@@ -74,10 +74,10 @@ func New(config LC.VlessServer, lc C.InboundListenConfig, tunnel C.Tunnel, addit
return nil, err
}
if sl.decryption != nil {
decryption := sl.decryption
defer func() { // decryption must be closed to avoid the goroutine leak
if err != nil {
_ = sl.decryption.Close()
sl.decryption = nil
_ = decryption.Close()
}
}()
}