mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-07-04 17:14:15 +00:00
ensure udpAddr is not nil
This commit is contained in:
parent
b44a5ab894
commit
bc8f92d8f1
1 changed files with 4 additions and 1 deletions
|
@ -399,7 +399,10 @@ func (w *PacketWriter) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
|||
}
|
||||
if ShouldUseSystemResolver {
|
||||
udpAddr, err := net.ResolveUDPAddr("udp", b.UDP.NetAddr())
|
||||
if err == nil {
|
||||
if err != nil {
|
||||
b.Release()
|
||||
continue
|
||||
} else {
|
||||
ip = net.IPAddress(udpAddr.IP)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue