Skip to content

fix(mux): http.infinite_loop.error increments when a TLS H2 client stops reading a large response #1788

Closed

Description

@FlorentinDUBOIS

http.infinite_loop.error increments when a TLS HTTP/2 client stops reading a large response, as #1780 reported for HTTP/1.1.

ConnectionH2::ensure_tls_flushed (lib/src/protocol/mux/h2.rs) re-raises the WRITABLE event whenever rustls still holds records, whatever the last socket write answered. After a write the kernel refused with WouldBlock, Mux::ready_inner (lib/src/protocol/mux/mod.rs) runs the write pass again on every inner iteration, each one refused, until MAX_LOOP_ITERATIONS. It is reached from the stalled control-frame flush of H2Shell::writable, from ConnectionH2::finalize_write_after_flush (FinalizeAction::ReArm) and from the GoAway/Error ReArmAndContinue arms.

Expected: a refused write waits for the kernel's next writable edge; the pending records are flushed once the client reads again.

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