aiortc / aioquic

QUIC and HTTP/3 implementation in Python
BSD 3-Clause "New" or "Revised" License
1.66k stars 236 forks source link

Set the idle timer according to RFC 9000 section 10.1 [#466]. #474

Closed rthalley closed 7 months ago

rthalley commented 7 months ago

This applies the rules for determining the idle timeout in RFC 9000 section 10.1.

If the remote has note specified a max idle timeout, we use the configured local value as the basis, otherwise we use the smaller of the two. Given the basis timeout, we then pick the bigger of it and 3 * PTO, to avoid the value being excessively small.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (e726115) to head (3bf2118). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #474 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 25 25 Lines 4891 4896 +5 ========================================= + Hits 4891 4896 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jlaine commented 7 months ago

Looks good, but I think I'd prefer this to be a private _idle_timeout() method?

rthalley commented 7 months ago

feedback incorporated, will merge after tests pass