优化udp代理

This commit is contained in:
arraykeys@gmail.com
2018-09-05 18:11:28 +08:00
parent 7d59d9ce4d
commit 5a81229a9c

View File

@ -3,7 +3,6 @@ package tcp
import ( import (
"crypto/tls" "crypto/tls"
"fmt" "fmt"
"io"
logger "log" logger "log"
"net" "net"
"runtime/debug" "runtime/debug"
@ -225,9 +224,9 @@ func (s *TCP) OutToUDP(inConn *net.Conn) (err error) {
if strings.Contains(err.Error(), "n != int(") { if strings.Contains(err.Error(), "n != int(") {
continue continue
} }
if !utils.IsNetDeadlineErr(err) && err != io.EOF && !utils.IsNetClosedErr(err) { // if !utils.IsNetDeadlineErr(err) && err != io.EOF && !utils.IsNetClosedErr(err) {
s.log.Printf("udp packet revecived from client fail, err: %s", err) // s.log.Printf("udp packet revecived from client fail, err: %s", err)
} // }
return return
} }
localAddr := *s.cfg.Parent localAddr := *s.cfg.Parent