mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00: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:
committed by
Cuong Manh Le
parent
d88cf52b4e
commit
44ba6aadd9
@@ -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