Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix incorrect reliance on autoDemand when handlers are not configured #11304

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

lorban
Copy link
Contributor

@lorban lorban commented Jan 23, 2024

Fixes #11303.

…figured

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban added Bug For general bugs on Jetty side Sponsored This issue affects a user with a commercial support agreement labels Jan 23, 2024
@lorban lorban added this to the 12.0.x milestone Jan 23, 2024
@lorban lorban self-assigned this Jan 23, 2024
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban requested a review from sbordet January 23, 2024 15:52
@@ -149,7 +147,6 @@ public void onWebSocketFrame(Frame frame, Callback callback)
BufferUtil.toUTF8String(frame.getPayload()),
frame.getPayloadLength()));
callback.succeed();
session.demand();
Copy link
Contributor

Choose a reason for hiding this comment

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

@lachlan-roberts @lorban while currently correct, the removal of this line is not ideal.

If an application wants to handle WebSocket frames directly and only override onWebSocketFrame(), it has no direct control over the demand.

I opened #11307

@lorban lorban merged commit aa3873f into jetty-12.0.x Jan 24, 2024
8 checks passed
@lorban lorban deleted the fix/12.0.x/11303-incorrect-websocket-autodemand branch January 24, 2024 08:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug For general bugs on Jetty side Sponsored This issue affects a user with a commercial support agreement
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

JettyWebSocketFrameHandler incorrectly relies on autoDemand when handlers are not registered
3 participants