Skip to content

Clamp holdback delay after priority multiplier#41

Open
therealvinayak wants to merge 1 commit into
mainfrom
fix/holdback-clamp
Open

Clamp holdback delay after priority multiplier#41
therealvinayak wants to merge 1 commit into
mainfrom
fix/holdback-clamp

Conversation

@therealvinayak
Copy link
Copy Markdown
Collaborator

The holdback delay was computed within the configured bounds
[CONFIG_NET_HOLDBACK_MIN_MS, CONFIG_NET_HOLDBACK_MAX_MS] and then
scaled by a priority multiplier.

This could push the final value outside the configured limits:

  • Emergency priority could produce values below the minimum
  • Low priority could exceed the maximum

This change enforces a final std::clamp() after applying the
priority multiplier to ensure the resulting holdback delay
always respects the configured bounds.

Closes #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Holdback can violate configured min/max after priority scaling

1 participant