-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
test: add quic datagrams test #57119
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
base: main
Are you sure you want to change the base?
Conversation
Adds tests for sending and receiving datagrams as strings and buffers from client->server and server->client. Switches offset/length around in `Uint8Array` constructor call as otherwise we send empty datagrams which get ignored. The test currently fails because the first datagram is received many times.
Opened as a draft because the tests don't pass currently. |
@jasnell I found a bit of weirdness in the implementation. It's mentioned in the test comments but if you call I would have thought that datagrams would be sendable after the After waiting for an arbitrary period the datagram is sent but is received multiple times. Is the user supposed to filter these duplicates out or is it an implementation bug? Finally if you close the server listener without first closing any active sessions a segfault occurs. If you do close the sessions first, the promise returned from the listener The segfault stack trace is:
..so it looks like maybe the client is still sending the duplicate datagrams to the server even after the session has been closed. |
The behaviour appears to be due to setting the When it's set, we hit this branch and add the same datagram to the outgoing packet over and over again hence all the duplicates. Setting the flag value to |
@achingbrain ... just FYI I haven't had the chance to take a look at this yet but I intend to soon! It will likely be in the next few days. Really appreciate your taking a look at this tho! |
Adds tests for sending and receiving datagrams as strings and buffers from client->server and server->client.
Switches offset/length around in
Uint8Array
constructor call as otherwise we send empty datagrams which get ignored.The test currently fails because the first datagram is received many times.