From 3fd5067ffbfdfe9457118c6b458f9f8fefb2c18e Mon Sep 17 00:00:00 2001 From: nange Date: Thu, 6 Jun 2024 18:52:21 +0800 Subject: [PATCH] chore: don't print warn log if error is ErrDeadline in easyss-server --- remote_udp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remote_udp.go b/remote_udp.go index 4353a0f4..6b6486c0 100644 --- a/remote_udp.go +++ b/remote_udp.go @@ -12,6 +12,7 @@ import ( "github.com/nange/easyss/v2/cipherstream" "github.com/nange/easyss/v2/log" "github.com/nange/easyss/v2/util/bytespool" + "github.com/nange/easyss/v2/util/netpipe" ) func (es *EasyServer) remoteUDPHandle(conn net.Conn, addrStr, method string, isDNSProto, tryReuse bool) error { @@ -47,7 +48,7 @@ func (es *EasyServer) remoteUDPHandle(conn net.Conn, addrStr, method string, isD if errors.Is(err, cipherstream.ErrFINRSTStream) { _tryReuse = true log.Debug("[REMOTE_UDP] received FIN when reading data from client, try to reuse the connection") - } else if !errors.Is(err, io.EOF) { + } else if !errors.Is(err, io.EOF) && !errors.Is(err, netpipe.ErrDeadline) { log.Warn("[REMOTE_UDP] read data from client connection", "err", err) }