Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce EndMessage #216

Merged

Conversation

slinkydeveloper
Copy link
Contributor

@slinkydeveloper slinkydeveloper marked this pull request as ready for review December 20, 2023 14:52
Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks for creating this PR @slinkydeveloper. As far as I can tell, the changes look good to me. I had a question about why it is ok to not await certain calls in the resultBytes callback.

@@ -303,7 +308,7 @@ export class StateMachine<I, O> implements RestateStreamConsumer {
"Function completed with an error: " + error.message
);

this.finishWithError(error);
this.sendErrorAndFinish(error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is a bit unrelated to the changes of this PR: Why is it ok to not await the result of this async function? Same question applies to the this.finish(value) call above.

Copy link
Contributor Author

@slinkydeveloper slinkydeveloper Dec 21, 2023

Choose a reason for hiding this comment

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

I'm not sure why, but just reading the code down the stack this function is async only for waiting the connection.end(), and probably it doesn't matter to wait on that.

@slinkydeveloper slinkydeveloper merged commit a5c8aaf into restatedev:main Dec 21, 2023
1 of 2 checks passed
@slinkydeveloper slinkydeveloper deleted the service-protocol/issues/49 branch December 21, 2023 14:48
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.

2 participants