Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Possible bug with WebSocket in BatchMode.ON and flush

Hi,
We have upgraded from Jetty 9.3 to 9.4.6 and started seeing NPE errors in CompressExtensions.
 
After some digging I believe that it is related to a change in CompressExtensions.deflate.
It tries to compress the FLUSH_FRAME and throws a NPE as it has no payload. Adding payload to FLUSH_FRAME doesn't help as it will prevent FrameFlusher from behaving correctly.
 
The suggested solution is to change CompressExtensions.deflate to:

private void deflate(FrameEntry entry)

{

Frame frame = entry.frame;

BatchMode batchMode = entry.batchMode;

if (OpCode.isControlFrame(frame.getOpCode()) || frame == FrameFlusher.FLUSH_FRAME)

{

// Do not deflate control frames

nextOutgoingFrame(frame,this,batchMode);

return;

}

compress(entry,true);

}

 

Thank you.

Best regards,
Erel Uziel
Anywhere Software


Back to the top