mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-29 03:51:28 +00:00
Remove useless error log
This commit is contained in:
parent
c4a307e84d
commit
6f93ef7736
|
@ -108,9 +108,7 @@ func (w *tcpWorker) callback(conn stat.Connection) {
|
||||||
newError("connection ends").Base(err).WriteToLog(session.ExportIDToError(ctx))
|
newError("connection ends").Base(err).WriteToLog(session.ExportIDToError(ctx))
|
||||||
}
|
}
|
||||||
cancel()
|
cancel()
|
||||||
if err := conn.Close(); err != nil {
|
conn.Close()
|
||||||
newError("failed to close connection").Base(err).WriteToLog(session.ExportIDToError(ctx))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *tcpWorker) Proxy() proxy.Inbound {
|
func (w *tcpWorker) Proxy() proxy.Inbound {
|
||||||
|
|
|
@ -2,6 +2,9 @@ package outbound
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/xtls/xray-core/app/proxyman"
|
"github.com/xtls/xray-core/app/proxyman"
|
||||||
"github.com/xtls/xray-core/common"
|
"github.com/xtls/xray-core/common"
|
||||||
|
@ -141,7 +144,13 @@ func (h *Handler) Dispatch(ctx context.Context, link *transport.Link) {
|
||||||
common.Interrupt(link.Writer)
|
common.Interrupt(link.Writer)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if err := h.proxy.Process(ctx, link, h); err != nil {
|
err := h.proxy.Process(ctx, link, h)
|
||||||
|
if err != nil {
|
||||||
|
if errors.Is(err, io.EOF) || errors.Is(err, io.ErrClosedPipe) || errors.Is(err, context.Canceled) {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
// Ensure outbound ray is properly closed.
|
// Ensure outbound ray is properly closed.
|
||||||
err := newError("failed to process outbound traffic").Base(err)
|
err := newError("failed to process outbound traffic").Base(err)
|
||||||
session.SubmitOutboundErrorToOriginator(ctx, err)
|
session.SubmitOutboundErrorToOriginator(ctx, err)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package udp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
@ -107,7 +108,9 @@ func handleInput(ctx context.Context, conn *connEntry, dest net.Destination, cal
|
||||||
|
|
||||||
mb, err := input.ReadMultiBuffer()
|
mb, err := input.ReadMultiBuffer()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newError("failed to handle UDP input").Base(err).WriteToLog(session.ExportIDToError(ctx))
|
if !errors.Is(err, io.EOF) {
|
||||||
|
newError("failed to handle UDP input").Base(err).WriteToLog(session.ExportIDToError(ctx))
|
||||||
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
timer.Update()
|
timer.Update()
|
||||||
|
|
Loading…
Reference in a new issue