[fix] the unit test gso_truncation #1853
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I find the unit test
gso_truncation
in this commit d5fc528 is wrong. In fact, it does not really pass.Specifically, I run the command
cargo test --color=always --lib tests::gso_truncation -- --show-output
to observe its output log. The client cannot decrypt the second packet, i.e.,server: quinn_proto::connection: failed to authenticate packet
.After I delete the following code in the commit d5fc528. The unit test
gso_truncation
exactly pass.Finally, I expose the deep reason. In the line 680
if let Some(mut builder) = builder_storage.take() {
,builder_storage.take
has beenNone
. Then we cannot send the last packet in Line 926-935, which is shown as following. So I re-insertbuilder
intobuilder_storage
in the PR. Then we pass the unix testgso_truncation
completely.