Skip to content

Ignore failed progress sends in server progress reporters - #1923

Merged
Dirk Bäumer (dbaeumer) merged 2 commits into
microsoft:mainfrom
trivikr:server-send-progress-promises
Oct 27, 2026
Merged

Dirk Bäumer (dbaeumer) merged 2 commits into
microsoft:mainfrom
trivikr:server-send-progress-promises

Conversation

@trivikr

Copy link
Copy Markdown
Contributor

The work done and partial result reporters dropped the promise returned by connection.sendProgress. If a write failed because the client went away, the rejection was never handled. On Node 15+ that crashes the server. Once the connection was closed or disposed, sendProgress threw synchronously instead, so begin/report/done raised "Connection is disposed." into the request handler.

Send progress through a helper that catches the synchronous throw and attaches a rejection handler, so progress stays best-effort. The connection already logs failed writes. The reporter API still returns void. Add connection tests that report progress on a disposed connection and after the server's output stream is destroyed.

The work done and partial result reporters dropped the promise returned by
connection.sendProgress. If a write failed because the client went away, the
rejection was never handled. On Node 15+ that crashes the server. Once the
connection was closed or disposed, sendProgress threw synchronously instead,
so begin/report/done raised "Connection is disposed." into the request handler.

Send progress through a helper that catches the synchronous throw and attaches
a rejection handler, so progress stays best-effort. The connection already logs
failed writes. The reporter API still returns void. Add connection tests that
report progress on a disposed connection and after the server's output stream
is destroyed.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 02:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Comment thread server/src/common/progress.ts Resolved
Copilot AI balanced review requested due to automatic review settings October 27, 2026 13:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@dbaeumer
Dirk Bäumer (dbaeumer) merged commit 82ed8ac into microsoft:main Oct 27, 2026
5 checks passed
@trivikr
Trivikram Kamat (trivikr) deleted the server-send-progress-promises branch October 27, 2026 19:14
@dbaeumer Dirk Bäumer (dbaeumer) added this to the 3.18.6 milestone Nov 19, 2026
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.

5 participants