Skip to content

Settle the old HTTP response before reconnecting after cutoff #189

Description

@kentbull

Problem

When an HTTP Client observes connector cutoff and its reconnect timer has expired, Client.service() currently reopens the transport before servicing the old Respondent. Reopening resets the parser generation first, so accepted bytes from the closed connection can be parsed under the new generation or remain suspended.

This loses the distinction between a valid close-delimited response, a truncated framed response, and an SSE stream whose final accepted event updates the retry interval.

Expected behavior

  • Latch EOF and service the old response generation before reconnecting.
  • Package a valid close-delimited response before reset.
  • Package truncated framed input as an errored response.
  • Parse accepted SSE events and use their retry interval for reconnect.
  • Clear residual old-generation receive bytes only after settlement.
  • Defer new connection admission and sends until a later recurrence.

Upstream dependency

This is not safe to submit against current main. It depends on #188, which itself must follow PRs #183, #185, and #187. The release branch already contains that prerequisite chain.

Activity

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