mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-15 05:31:18 +08:00
Fix: crash in handleConn
This commit is contained in:
parent
f75cd04181
commit
b137a50d85
@ -165,7 +165,7 @@ func (t *Tunnel) handleUDPConn(localConn C.ServerAdapter, metadata *C.Metadata,
|
|||||||
addr = naddr
|
addr = naddr
|
||||||
pc = rawpc
|
pc = rawpc
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnln("%s --> %v match %s using %s error: %s", metadata.SrcIP.String(), metadata.String(), rule.RuleType().String(), rule.Adapter(), err.Error())
|
log.Warnln("dial %s error: %s", proxy.Name(), err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,9 +184,8 @@ func (t *Tunnel) handleUDPConn(localConn C.ServerAdapter, metadata *C.Metadata,
|
|||||||
|
|
||||||
func (t *Tunnel) handleTCPConn(localConn C.ServerAdapter, metadata *C.Metadata, proxy C.Proxy, rule C.Rule) {
|
func (t *Tunnel) handleTCPConn(localConn C.ServerAdapter, metadata *C.Metadata, proxy C.Proxy, rule C.Rule) {
|
||||||
remoConn, err := proxy.Dial(metadata)
|
remoConn, err := proxy.Dial(metadata)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnln("%s --> %v match %s using %s error: %s", metadata.SrcIP.String(), metadata.String(), rule.RuleType().String(), rule.Adapter(), err.Error())
|
log.Warnln("dial %s error: %s", proxy.Name(), err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer remoConn.Close()
|
defer remoConn.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user