-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocket: message handler sometimes called with null data (potentially issue in frame processing) #2859
Comments
does this only occur during debugging? |
Yes, I only encountered this error in debugging. But, I assume that the problem is not related to it, but to the timings. Before null in the message handler received, two breakpoints are triggered. But if you send a ping from the server with a little delay (calling |
Maybe, I think there's definitely room for improvement in parsing control frames (frames that can't be fragmented). I'll look into it but no promises. |
FWIW, I definitely encountered this bug outside of debugging. The WebSocket would receive messages correctly for a while and then it would always give me |
Bug Description
I’ll say right away that the bug is floating and I don’t have a ready-made recipe for reproducing it. The bug usually appeared during debugging. Apparently, timings and the sequence of data arrival are important. The server should also send pings to get this effect.
From the screenshot you can see that the
websocketMessageReceived
function is called withthis.#info.originalOpcode=9
(PING frame type), which should not happen.Logs & Screenshots
Environment
node v21.6.2
The text was updated successfully, but these errors were encountered: