onWebSocketFrame method should complete callback. more details see issue JETTY 11088

Comment From: pivotal-cla

@leonchen83 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@leonchen83 Thank you for signing the Contributor License Agreement!

Comment From: sdeleuze

@sbordet From your perspective, should we apply this fix to the Jetty 11 support we have in Spring Framework 6.0.x as well?

Comment From: sbordet

@sdeleuze Jetty 11 does not need this fix because it does not use Callback.

The corresponding signature in Jetty 11 would be:

@OnWebSocketFrame
public void onWebSocketFrame(Frame frame)

so no Callback. In Jetty 11 there is the requirement that the frame payload must be consumed synchronously in the method invocation, or copied to be consumed asynchronously, because when returning from the onWebSocketFrame() method the frame payload buffer is recycled.