style: simplify error logging

This commit is contained in:
SunBK201 2025-10-30 23:40:37 +08:00
parent ecbc768fc4
commit b61fc4e827

View File

@ -100,7 +100,7 @@ func (r *Rewriter) ProxyHTTPOrRaw(dst net.Conn, src net.Conn, destAddr string) (
reader := bufio.NewReader(src) reader := bufio.NewReader(src)
defer func() { defer func() {
if err != nil { if err != nil {
log.LogDebugWithAddr(srcAddr, destAddr, fmt.Sprintf("ProxyHTTPOrRaw Error: %s", err.Error())) log.LogDebugWithAddr(srcAddr, destAddr, fmt.Sprintf("ProxyHTTPOrRaw: %s", err.Error()))
} }
io.Copy(dst, reader) io.Copy(dst, reader)
}() }()