From 1814b07a4b6e864edace208e7e5fcc847d6f729f Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Wed, 9 Oct 2024 14:02:23 +0200 Subject: [PATCH] Replace error check to errors.Is --- client/internal/wgproxy/ebpf/wrapper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/internal/wgproxy/ebpf/wrapper.go b/client/internal/wgproxy/ebpf/wrapper.go index ec1162263..bdef42fe3 100644 --- a/client/internal/wgproxy/ebpf/wrapper.go +++ b/client/internal/wgproxy/ebpf/wrapper.go @@ -4,6 +4,7 @@ package ebpf import ( "context" + "errors" "fmt" "io" "net" @@ -115,7 +116,7 @@ func (p *ProxyWrapper) readFromRemote(ctx context.Context, buf []byte) (int, err if ctx.Err() != nil { return 0, ctx.Err() } - if err != io.EOF { + if !errors.Is(err, io.EOF) { log.Errorf("failed to read from turn conn (endpoint: :%d): %s", p.wgEndpointAddr.Port, err) } return 0, err