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

Improve incoming message handling on both Node and Deno #704

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

d-gubert
Copy link
Member

What? β›΅

Both ends of the socket now can receive multiple messages or incomplete messages and will handle this appropriately

Why? πŸ€”

Links 🌎

PS πŸ‘€


let messageBuffer: string[] = [];

this.deno.stdout.on('data', async (chunk: Buffer) => {
Copy link
Member Author

@d-gubert d-gubert Jan 12, 2024

Choose a reason for hiding this comment

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

I had to move this out of parseOutput because I needed the messageBuffer to live outside the scope of the callback.

There is likely a better way to do this, but it can be left to another time maybe

@tapiarafael tapiarafael merged commit 46be1ff into feat/deno-runtime Jan 12, 2024
5 checks passed
@tapiarafael tapiarafael deleted the deno/fix-node-message-separator branch January 12, 2024 16:52
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