Skip to content

fix: Coordinate method stream cancellation and input cleanup - #5898

Merged
marcelomendoncasoares merged 7 commits into
serverpod:mainfrom
marcelomendoncasoares:fix/method-stream-close-ordering
Nov 25, 2026
Merged

marcelomendoncasoares merged 7 commits into
serverpod:mainfrom
marcelomendoncasoares:fix/method-stream-close-ordering

Conversation

@marcelomendoncasoares

@marcelomendoncasoares marcelomendoncasoares commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5897.

Closing a method stream now starts producer cancellation promptly. Other calls on the same WebSocket keep running during cleanup, even if the producer throws.

Pre-launch Checklist

  • Read the contribution process and Dart style guidance.
  • This change addresses one method-stream cancellation lifecycle bug.
  • Formatted the changed Dart code and completed targeted static analysis.
  • Linked the issue addressed by this PR.
  • Reviewed the relevant lifecycle comments and documentation.
  • Added regression tests for the changed behavior.
  • All existing and new tests are passing.
  • Documented breaking changes below.

Breaking changes

None.

@marcelomendoncasoares marcelomendoncasoares changed the title fix: Cancel method stream producers before closing their inputs fix: Coordinate method stream cancellation and input cleanup Oct 23, 2026
@marcelomendoncasoares
marcelomendoncasoares marked this pull request as draft October 23, 2026 17:25
@marcelomendoncasoares
marcelomendoncasoares force-pushed the fix/method-stream-close-ordering branch from b209b92 to 27681d4 Compare November 13, 2026 14:10
@marcelomendoncasoares
marcelomendoncasoares marked this pull request as ready for review November 23, 2026 22:50
@marcelomendoncasoares
marcelomendoncasoares requested a review from a team November 23, 2026 22:51

@FXschwartz FXschwartz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@marcelomendoncasoares
marcelomendoncasoares merged commit 1edf3aa into serverpod:main Nov 25, 2026
482 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 25, 2026
@marcelomendoncasoares
marcelomendoncasoares deleted the fix/method-stream-close-ordering branch November 25, 2026 21:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Method stream closure can wait on paused input and stall shared socket traffic

2 participants