derp/derpserver: fix Server.UpdateRateLimits docs

As of 0e9f9e2bd it is possible to have an infinity per-client limit,
with finite global.

Updates tailscale/corp#40962

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2026-04-29 14:33:00 -07:00 committed by Jordan Whited
parent 0e9f9e2bd8
commit c0a9728fe2

View File

@ -570,9 +570,9 @@ func (s *Server) LoadAndApplyRateConfig(path string) error {
}
// UpdateRateLimits sets the receive rate limits, updating all existing client
// connections. It returns the applied config, which may differ from rc. If the
// per-client rate limit is 0, rate limiting is disabled. Mesh peers are always
// exempt from rate limiting.
// connections. It returns the applied config, which may differ from rc. If both
// the per-client and global rate limits are 0, rate limiting is disabled. Mesh
// peers are always exempt from rate limiting.
func (s *Server) UpdateRateLimits(rc RateConfig) (applied RateConfig) {
s.mu.Lock()
defer s.mu.Unlock()