Skip to content

Commit

Permalink
chore: don't print warn log if error is ErrDeadline in easyss-server
Browse files Browse the repository at this point in the history
  • Loading branch information
nange committed Jun 6, 2024
1 parent 6cd47c5 commit 3fd5067
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion remote_udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 3fd5067

Please sign in to comment.