From 42bfe5aa70624f1e4fded5535e3d2ba1e0dbfd02 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 2 Apr 2022 20:35:43 +0100 Subject: [PATCH] add a nolint directive for the use of net.Error.Temporary when reading from conn --- packet_handler_map.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packet_handler_map.go b/packet_handler_map.go index 23a85856..6975d5a2 100644 --- a/packet_handler_map.go +++ b/packet_handler_map.go @@ -344,6 +344,10 @@ func (h *packetHandlerMap) listen() { defer close(h.listening) for { p, err := h.conn.ReadPacket() + //nolint:staticcheck // SA1019 ignore this! + // TODO: This code is used to ignore wsa errors on Windows. + // Since net.Error.Temporary is deprecated as of Go 1.18, we should find a better solution. + // See https://github.com/lucas-clemente/quic-go/issues/1737 for details. if nerr, ok := err.(net.Error); ok && nerr.Temporary() { h.logger.Debugf("Temporary error reading from conn: %w", err) continue