-
Bug
-
Resolution: Done
-
Major
-
1.4.21.Final
-
None
While load testing my Undertow-based application, I noticed that occasionally one of the WebSocket connections would stop receiving messages.
On a hunch, I commented out the calls to suspendReceives and resumeReceives (which I was using to provide backpressure while a potentially long-running asynchronous message processor does its work), and the problem went away.
Digging deeper, I examined the Undertow source code and theorized that the implementation of resumeReceives might not be correct for SSL channels, where during a handshake reads may require writes and vice-versa. So I came up with the attached hacky, heavy-handed patch (TL;DR: call wakeupReads and wakeupWrites unconditionally).
AFAICT, that patch fixes the problem.