fix: fix timeout error in noua case

This commit is contained in:
SunBK201 2025-04-12 02:53:18 +08:00
parent 087ea9e6a8
commit 2e4aefd7ec

View File

@ -430,6 +430,9 @@ func transfer(dst net.Conn, src net.Conn, destAddrPort string) {
if uaStr == "" {
cache.Add(destAddrPort, destAddrPort)
logrus.Debug(fmt.Sprintf("[%s] Not found User-Agent, Add LRU Relay Cache, Cache Len: %d", destAddrPort, cache.Len()))
if err = request.Write(dst); err != nil {
logrus.Error(fmt.Sprintf("[%s][%s] write error: %s", destAddrPort, src.(*net.TCPConn).RemoteAddr().String(), err.Error()))
}
io.Copy(dst, srcReader)
return
}