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:
@@ -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()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user