fix comparison rule from errorlint

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-06-08 11:52:34 +02:00
parent b65c31427c
commit 6d737371b8
95 changed files with 260 additions and 206 deletions

View File

@@ -121,7 +121,7 @@ func (proxy *UDPProxy) replyLoop(cte *connTrackEntry, serverAddr net.IP, clientA
again:
read, err := cte.conn.Read(readBuf)
if err != nil {
if err, ok := err.(*net.OpError); ok && err.Err == syscall.ECONNREFUSED {
if err, ok := err.(*net.OpError); ok && errors.Is(err.Err, syscall.ECONNREFUSED) {
// This will happen if the last write failed
// (e.g: nothing is actually listening on the
// proxied port on the container), ignore it