mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-29 13:51:51 +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:
1 parent
d88cf52b4e
commit
44ba6aadd9
1 file changed
+4
@@ -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