-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rechannel: don't ack fragment packet on the first received fragment
Only ack the packet when all fragments are received. The connection was considering the packet received on the first fragment received, this would cause sync errors when one fragment is missed, the other end would think the packet was received and would never resend the messages that were in that packet. Added test to considers check this case, also updated the usage test to fragment packets and add rng to have better packet loss simulation.
- Loading branch information
1 parent
2339e56
commit 207091a
Showing
4 changed files
with
51 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ bytes = { version = "1.1", features = ["serde"] } | |
|
||
[dev-dependencies] | ||
env_logger = "0.9.0" | ||
rand = "0.8.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters