Skip to content

Commit

Permalink
Fix timeouts configuration (#1802)
Browse files Browse the repository at this point in the history
This refactors the way that timeout configuration is used in the spec,
and fixes several bugs, but does not otherwise have intentional
normative changes.

The main change is the creation of a "timeouts configuration" struct
that is owned by the session. A new struct is created when the
timeouts are changed (including during capabilities processing) and
this fixes a number of confusing cases where the "JSON deserialize"
algorithm was linked in place of the more specific algorithm for
reading the timeout data.

In addition a new "timer" class is created with a flag that's set when
the required time has elapsed. This is now used in all places where we
wait up to a timeout, and we assume we're able to wait for the flag to
change, or check the current value of the flag, as required. Fixing
this required fixing many cases where it was assumed that timeouts
couldn't be null.

Co-authored-by: Alex Rudenko <[email protected]>
Co-authored-by: Henrik Skupin <[email protected]>
  • Loading branch information
3 people authored Mar 11, 2024
1 parent 44031be commit 6c86972
Showing 1 changed file with 385 additions and 276 deletions.
Loading

0 comments on commit 6c86972

Please sign in to comment.