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

Replace ctx.channel().writeAndFlush with ctx.writeAndFlush in WebSockets handlers #12540

Merged
merged 2 commits into from
Jul 2, 2022

Conversation

doom369
Copy link
Contributor

@doom369 doom369 commented Jun 30, 2022

Motivation:

There is no actual need to call ctx.channel().writeAndFlush instead of ctx.writeAndFlush. Should be shorter execution path as well.

@hyperxpro
Copy link
Contributor

I really doubt that this is going to make any improvement in performance.

@normanmaurer
Copy link
Member

@hyperxpro imho this is less about performance but more about correctness.

@normanmaurer normanmaurer added this to the 4.1.79.Final milestone Jun 30, 2022
@normanmaurer normanmaurer merged commit f4edab3 into netty:4.1 Jul 2, 2022
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
…ets handlers (netty#12540)

Motivation:

There is no actual need to call `ctx.channel().writeAndFlush` instead of `ctx.writeAndFlush`.  Using the context is also more correct as it start at the right place in the pipeline.

Modification:

Use the context and not the channel

Result:

More correct code
franz1981 pushed a commit to franz1981/netty that referenced this pull request Aug 22, 2022
…ets handlers (netty#12540)

Motivation:

There is no actual need to call `ctx.channel().writeAndFlush` instead of `ctx.writeAndFlush`.  Using the context is also more correct as it start at the right place in the pipeline.

Modification:

Use the context and not the channel

Result:

More correct code
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.

None yet

3 participants