Skip to content

In-flight progress notifications block EOF response drain and lose the handler reply #1523

Done

Description

@perfloop-agent

A server handler that sends progress after the client closes its input can block shutdown for the five-second EOF drain and lose its reply, even though the client is still reading output. The drain introduced in #759 waits for in-flight handler responses but stops servicing the peer messaging those handlers can await.

Minimal reproduction

On revision c78f27640634976d542d5bacc1ec8be39c6ff310, use serve_directly_with_ct with a ServerHandler and separate Tokio duplex streams for input and output:

  1. Send {"jsonrpc":"2.0","id":1,"method":"ping"} followed by a newline. Have the ping handler wait until the service's input reader observes EOF.
  2. Once the handler starts, close only the client's write half; keep its output reader open.
  3. After EOF is observed, let the handler await context.peer.notify_progress(ProgressNotificationParam::new(ProgressToken(NumberOrString::Number(7)), 1.0)), then return Ok(()).

Expected: the client receives the progress notification and the successful response for ID 1, and the server finishes without waiting for the drain deadline.

Actual: the notification call waits throughout the drain, so the handler cannot finish its response; the drain expires and the output closes without that reply.

#1489 covers queued messages by dropping the outbound receiver, but does not unblock already-dispatched notification sends or pending peer requests.

Activity

  1. added
    bug
    P1
    T-service
    ready for work
    on Nov 30, 2026
  2. github-actions commented on Nov 30, 2026

    @github-actions
    Contributor

    @connor4312 is on triage rotation this week and is the reviewer for this one.

    Codex labeled this bug / P1 (T-service). Please confirm or correct those labels.

    Automated triage. Labels are a first pass and the assigned maintainer has the final say.

  3. added
    P2
    and removed
    P1
    on Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2T-servicebugready for work

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions