Skip to content

Conversation

camshaft
Copy link
Contributor

Description of changes:

This change includes a fix to arm the recv idle timer on initialization. This avoids a hang where the server never sends a single packet (or the client never receives any), which means there is no timer armed and then the client hangs indefinitely.

Testing:

I added a test to show the fix working.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft requested a review from Copilot April 18, 2025 15:31
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes an issue where the client hangs indefinitely due to the failure to arm the receive idle timer on initialization. The key changes include:

  • Updated the idle timer initialization in the stream receive state to use a provided clock.
  • Propagated the clock dependency through shared receiver state and the endpoint creation.
  • Added a test to validate the fix for the idle timeout behavior.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
dc/s2n-quic-dc/src/stream/tests/idle_timeout.rs Introduces a test for server inactivity that triggers the idle timer.
dc/s2n-quic-dc/src/stream/tests.rs Registers the new idle_timeout test module.
dc/s2n-quic-dc/src/stream/recv/state.rs Modifies the stream receive state constructor to set the idle timer using a clock.
dc/s2n-quic-dc/src/stream/recv/shared.rs Updates the shared receive state constructor to incorporate the clock.
dc/s2n-quic-dc/src/stream/endpoint.rs Passes the current time (clock value) to the shared receive state creation.

@camshaft camshaft force-pushed the camshaft/dc-recv-idle-timer branch from d58e771 to 1e4c8dd Compare April 18, 2025 17:29
@camshaft camshaft merged commit e6edaee into main Apr 18, 2025
124 checks passed
@camshaft camshaft deleted the camshaft/dc-recv-idle-timer branch April 18, 2025 17:48
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.

2 participants