mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-04 19:04:00 +00:00
Fix: udp crash in tunnel
This commit is contained in:
parent
b589754485
commit
e837470a6a
1 changed files with 2 additions and 1 deletions
|
@ -159,10 +159,11 @@ func (t *Tunnel) handleConn(localConn C.ServerAdapter) {
|
|||
|
||||
if metadata.NetWork == C.UDP {
|
||||
pc, addr, err := proxy.DialUDP(metadata)
|
||||
defer pc.Close()
|
||||
if err != nil {
|
||||
log.Warnln("Proxy[%s] connect [%s --> %s] error: %s", proxy.Name(), metadata.SrcIP.String(), metadata.String(), err.Error())
|
||||
return
|
||||
}
|
||||
defer pc.Close()
|
||||
|
||||
t.handleUDPOverTCP(localConn, pc, addr)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue