style: simplify error logging

This commit is contained in:
SunBK201 2025-10-30 23:40:37 +08:00
parent 22efbbc6b8
commit 11b14bedbf

View File

@ -100,7 +100,7 @@ func (r *Rewriter) ProxyHTTPOrRaw(dst net.Conn, src net.Conn, destAddr string) (
reader := bufio.NewReader(src)
defer func() {
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)
}()