Skip to content

extract pto duration calculation into helper function#2435

Open
knQzx wants to merge 1 commit into
cloudflare:masterfrom
knQzx:refactor-pto-duration-helper
Open

extract pto duration calculation into helper function#2435
knQzx wants to merge 1 commit into
cloudflare:masterfrom
knQzx:refactor-pto-duration-helper

Conversation

@knQzx
Copy link
Copy Markdown

@knQzx knQzx commented Apr 4, 2026

summary

  • added pto_timeout() default method on the Recovery trait that returns self.pto() * 3
  • replaced all 5 occurrences of the duplicated pto() * 3 expression in lib.rs with the new helper
  • matches the RFC 9000 Section 10.2 recommendation for draining/closing period duration

test plan

  • ran full cargo test -p quiche - all 977 unit tests and 45 doc tests pass
  • verified no remaining pto * 3 or pto() * 3 patterns in the codebase

fixes #2369

@knQzx knQzx requested a review from a team as a code owner April 4, 2026 22:56
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.

Make PTO duration usage and calculation uniform

1 participant