mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 17:51:16 +08:00
Update udp.go
This commit is contained in:
@@ -51,7 +51,7 @@ func (h *udpHandler) fetchUDPInput(conn core.UDPConn, input net.PacketConn, addr
|
|||||||
input.SetDeadline(time.Now().Add(h.timeout))
|
input.SetDeadline(time.Now().Add(h.timeout))
|
||||||
n, _, err := input.ReadFrom(buf)
|
n, _, err := input.ReadFrom(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err, ok := err.(net.Error); !ok || !err.Timeout() {
|
if netErr, ok := err.(net.Error); !ok || !netErr.Timeout() {
|
||||||
log.Warnf("failed to read UDP data from remote: %v", err)
|
log.Warnf("failed to read UDP data from remote: %v", err)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user