Skip to content

Describe UDP stale timer handling as deadline revalidation #1825

Closed

Description

@FlorentinDUBOIS

UDP stale-expiry handling is correct, but its lifecycle documentation attributes correctness to a generation token that the timeout path does not consume.

UdpFlow::touch increments timer_gen (flow), while UdpManager::handle_timeout selects flows solely by idle_deadline <= now and then consume-then-reschedules the manager timer (manager). The docs and tests call this generation matching (lifecycle), but production only writes the token; it never compares a captured generation.

git grep -n timer_gen -- lib/src/protocol/udp

No runtime failure is claimed: deadline revalidation plus consume-then-reschedule protects refreshed flows. Update comments/docs/test names to describe the mechanism actually enforcing the invariant, or wire a captured generation through the timer contract if generation matching is intended. Also correct the lifecycle citation that says UdpListenerSession::close clears the delivered timer; the clear occurs in the timeout handler.

Documentation and implementation checked at bd19a78e2831fa9b3bc099eff96359f1bd457958 on 2026-10-03. No runtime defect is alleged.

Activity

  1. added a commit that references this issue on Oct 4, 2026
    4c51ba8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions