Created attachment 37868 [details] A probable fix for the issue. Needs confirmation though. If the compression is enabled and inflated size is exactly 8192, then tomcat closes the websocket connection with Close code 1009 below message: No async message support and buffer too small. Buffer size: [8,192], Message size: [1,202]] Root cause: PerMessageDeflate.getMoreData() finds that there's no space in the buffer but doesn't check if at that time, the complete message is written or not. And thus, instead of returning the END_OF_FRAME it returns OVERFLOW. It causes to close the connection with a message that doesn't make much sense (buffer size 8192 is small for message size 1202). With the attached file containing the changes, I was able to get around the problem and my connection was stable, but not sure if this is the most elegant way to do it as there's already some complicated logic to find the TransformationResut.
Do you have a test case that reproduces this?
No need for a test case. I've been able to build a unit test that demonstrates this.
Test case now passes with the proposed patch applied. There are a lot of edge cases here so I want to run the Autobahn test suite before committing this.
All looks good. Thanks for the report and the patch. Fixed in: - 10.0.x for 10.0.7 onwards - 9.0.x for 9.0.47 onwards - 8.5.x for 8.5.67 onwards
Thanks a lot for taking quick action on this.