mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-25 01:59:07 +02:00
golangci-lint: use forbidigo to block time.Sleep (#2946)
This commit is contained in:
@@ -364,7 +364,13 @@ func serverSTUNListener(ctx context.Context, packetConn *net.UDPConn) {
|
||||
return
|
||||
}
|
||||
log.Error().Caller().Err(err).Msgf("STUN ReadFrom")
|
||||
time.Sleep(time.Second)
|
||||
|
||||
// Rate limit error logging - wait before retrying, but respect context cancellation
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case <-time.After(time.Second):
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user