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

Remove redundant writer.flushBuffer() call #1207

Merged
merged 1 commit into from
Aug 19, 2024
Merged

Conversation

MauriceVanVeen
Copy link
Member

When doing a request through requestFutureInternal we'd publish the message into the outgoing write queue, and immediately after call writer.flushBuffer().

Due to the message needing to go through the outgoing message queue, which takes a small amount of time, the flushBuffer would be done first and before our message got written to the dataPort.

Removing the call to writer.flushBuffer() since it doesn't actually flush our message/request.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

When doing a request through `requestFutureInternal` we'd publish the message into the outgoing write queue, and immediately after call `writer.flushBuffer()`.

Due to the message needing to go through the outgoing message queue, which takes a small amount of time, the `flushBuffer` would be done first and before our message got written to the `dataPort`.

Removing the call to `writer.flushBuffer()` since it doesn't actually flush our message/request.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from scottf August 19, 2024 09:50
Copy link
Contributor

@scottf scottf left a comment

Choose a reason for hiding this comment

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

Agreed, doesn't make much sense since the flush will occur before the message.

@scottf scottf merged commit 93ad1c2 into main Aug 19, 2024
4 checks passed
@scottf scottf deleted the fix/remove-redundant-flush branch August 19, 2024 10:42
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