mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user