-
-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The priority-based send state implementation had an issue where if returned `self.can_send() == true` even if no data was available for sending. This condition lead the `poll_transmit` method to initiate a transmission which passed the ACK-only check since it assumed there was stream data to send. However when trying to write stream frames no actual stream data could be written. The reason for this was that the `can_send()` condition only checked for the length of the binary heap. However the length of this one was only reduced in `write_stream_frames()` when the level was inspected the next time, and not after data of one level was actually written. This change fixes that, and drops the unused levels immediately after data was written. There is on exception however: If only one level is left, it is kept around and reused for future transmits to avoid deallocating and reallocating the transmit queue continuously. However the `can_send` check was updated to account for the empty level. I also added some additional debug asserts which cross-checks if an operation which announced to write more than just ACKs still ended up only writing ACKs. That should make it easier to determine similar issues in the future. **Ack only transmissions in benchmark before change:** 1462 **Ack only transmissions in benchmark after change:** 45
- Loading branch information
1 parent
8c89bfb
commit d21032b
Showing
3 changed files
with
161 additions
and
12 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
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