-
Notifications
You must be signed in to change notification settings - Fork 16
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
connection.go : concurrent map writes #23
Comments
That's something I had on sight for a long time. I would like to avoid introducing safe maps when no write conflict currently exist. Maybe that makes extending QUIC-Tracker less easy, thoughts ?Currently there are the following maps.
|
Thanks for the detailed response :) It does seem to be the case that the concurrent write errors are occurring because of the PacketNumber map. So just making that concurrency safe should fix the problem. Assigning a number before sending the packet(probably in the EncodeAndEncrypt function ?) does seem more sophisticated but couldn't multiple agents call the DoSendPacket or EncodeAndEncrypt function though ? In that case, wouldn't a safe map still be needed ? Ability to choose a packet number in a scenario would probably be important if a scenario is testing something like this if I'm not wrong :- "A QUIC endpoint MUST NOT reuse a packet number within the same packet number space in one connection. If the packet number for sending reaches 2^62 - 1, the sender MUST close the connection without sending a CONNECTION_CLOSE frame or any further packets; an endpoint MAY send a Stateless Reset (Section 10.4) in response to further packets that it receives." |
Errors also happen when a read and a write occurs simultaneously. This is frequently the case for |
The Connection struct seems to use normal maps and not concurrency safe maps. This leads to concurrent map write errors sometimes.
The text was updated successfully, but these errors were encountered: