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:
committed by
Jordan Whited
parent
0e9f9e2bd8
commit
c0a9728fe2
@@ -570,9 +570,9 @@ func (s *Server) LoadAndApplyRateConfig(path string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UpdateRateLimits sets the receive rate limits, updating all existing client
|
// UpdateRateLimits sets the receive rate limits, updating all existing client
|
||||||
// connections. It returns the applied config, which may differ from rc. If the
|
// connections. It returns the applied config, which may differ from rc. If both
|
||||||
// per-client rate limit is 0, rate limiting is disabled. Mesh peers are always
|
// the per-client and global rate limits are 0, rate limiting is disabled. Mesh
|
||||||
// exempt from rate limiting.
|
// peers are always exempt from rate limiting.
|
||||||
func (s *Server) UpdateRateLimits(rc RateConfig) (applied RateConfig) {
|
func (s *Server) UpdateRateLimits(rc RateConfig) (applied RateConfig) {
|
||||||
s.mu.Lock()
|
s.mu.Lock()
|
||||||
defer s.mu.Unlock()
|
defer s.mu.Unlock()
|
||||||
|
|||||||
Reference in New Issue
Block a user