Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix WebSocketServer sometimes missing GET request
On Ubuntu 22.04 with Linux 6.5, it was observed that when the server gets the SSL records containing the client handshake finished message and the first HTTP GET request in ONE read operation, the latter SSL record is never processed. Commit 89eaf41 should have fixed this, but it turned out that when SSLSocketChannel2#processHandshake() is called from SSLSocketChannel2#write(), the second SSL record containing the HTTP GET request is stashed away, but never retrieved, since the calling code in WebSocketServer#doWrite() has no provisions for this, only WebSocketServer#doRead() does. Change SSLSocketChannel2#processHandshake() to only read from the socket when called from SSLSocketChannel#read(), to ensure that when two SSL records are read, the second one is processed as well. This fixes issue TooTallNate#1418.
- Loading branch information