Make treatment of session disconnect and transport closing similar#323
Merged
masad-frost merged 2 commits intomainfrom Jun 12, 2025
Merged
Make treatment of session disconnect and transport closing similar#323masad-frost merged 2 commits intomainfrom
masad-frost merged 2 commits intomainfrom
Conversation
masad-frost
commented
Jun 11, 2025
__tests__/invalid-request.test.ts
Outdated
| { | ||
| path: '/mustSendThings', | ||
| message: 'Expected required property', | ||
| message: 'Required property', |
Member
Author
There was a problem hiding this comment.
This is an unrelated change that came with the latest typebox upgrade.
Member
Author
There was a problem hiding this comment.
nvm, my nodE_modules are outdated
jackyzha0
reviewed
Jun 12, 2025
|
|
||
| const writable = new WritableImpl<Static<PayloadType>>({ | ||
| writeCb: () => { | ||
| // noop |
Member
There was a problem hiding this comment.
this should probably error as the writable we close on UNEXPECTED_DISCONNECT in the normal case iirc so this should match?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
After the transport closes, calling a procedure from the client leads to throwing an error telling you transport is closed. This happens because we end up creating a new session and then failing at getting the bound send
What changed
We no longer expose the status of the transport to the caller, we pretend that your session suddenly disconnected, unifying the interface when reading after session closed and calling after transport closed.
Versioning