Closed tayler-king closed 11 months ago
Please provide a minimal reproducer.
@uNetworkingAB I have created a reproducer available at https://github.com/tayler-king/uWS-maximum-payload
$ node server.js
SERVER: started socket server on port 7032
$ node client.js
CLIENT: established connection to socket server
CLIENT: received message from socket server with length 128
CLIENT: received message from socket server with length 16384
CLIENT: lost connection to socket server 1006
I tried to reproduce this using the same settings, different combo of settings, publishing the message, both web browser and ws client library, not able to reproduce issue at all, maxPayloadLength working correctly at 32 1024 1024
I tried your example repo, works fine
CLIENT: established connection to socket server CLIENT: received message from socket server with length 128 CLIENT: received message from socket server with length 16384 CLIENT: received message from socket server with length 32768
I tried to reproduce this using the same settings, different combo of settings, publishing the message, both web browser and ws client library, not able to reproduce issue at all, maxPayloadLength working correctly at 32 1024 1024
Let me validate that I was running this on the latest version and get back to you.
What system are you running on, I use Amazon Linux 2023
Arm64. I used latest uWS.js 20.31.0
and Node.js 20.5.1
What system are you running on, I use
Amazon Linux 2023
Arm64. I used latest uWS.js20.31.0
and Node.js20.5.1
Apple M2. Will update once I've double checked the package and node version.
I haven't been able to replicate again. Yarn must've cached an older version - latest version doesn't have this issue.
For some reason it seems as though
maxPayloadLength
is being ignored. See the following code which is a essentially an echo server:If a client sends a message that is
16 * 1024
bytes it works without issue, if it sends a message16 * 1024 + 1
bytes then the connection is closed.. Am I just being stupid? I'm using the ws library as the client with amaxPayload
of 100MiB.Interestingly it doesn't call the
close
handler (not pictured above) when this happens..