internal/clientinfo: do not complain about net.ErrClosed

The probeLoop may have closed the connection before readLoop return, and
we don't care about this error. So prevent it from annoying the log.
This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-11-06 20:01:42 +07:00
1 parent d88cf52b4e
commit 44ba6aadd9
1 file changed
+4
+4
View File
@@ -123,6 +123,10 @@ func (m *mdns) readLoop(conn *net.UDPConn) {
if err, ok := err.(*net.OpError); ok && (err.Timeout() || err.Temporary()) {
continue
}
// Do not complain about use of closed network connection.
if errors.Is(err, net.ErrClosed) {
return
}
ctrld.ProxyLogger.Load().Debug().Err(err).Msg("mdns readLoop error")
return
}