Skip to content
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

fix usage of ackhandler.Packet pool for non-ack-eliciting packets #3538

Merged
merged 1 commit into from Aug 30, 2022

Conversation

marten-seemann
Copy link
Member

Fixes #3537.

@@ -27,31 +27,37 @@ func newSentPacketHistory(rttStats *utils.RTTStats) *sentPacketHistory {
}
}

func (h *sentPacketHistory) SentPacket(p *Packet, isAckEliciting bool) {
if p.PacketNumber <= h.highestSent {
func (h *sentPacketHistory) SentNonAckElicitingPacket(pn protocol.PacketNumber, encLevel protocol.EncryptionLevel, t time.Time) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function now takes the values directly and not a *Packet, to sure there's no way it can store the *Packet.

@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Base: 85.56% // Head: 85.49% // Decreases project coverage by -0.07% ⚠️

Coverage data is based on head (55ddcbd) compared to base (3f1adfd).
Patch coverage: 95.65% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3538      +/-   ##
==========================================
- Coverage   85.56%   85.49%   -0.07%     
==========================================
  Files         137      137              
  Lines       10087    10259     +172     
==========================================
+ Hits         8630     8770     +140     
- Misses       1080     1109      +29     
- Partials      377      380       +3     
Impacted Files Coverage Δ
internal/ackhandler/sent_packet_history.go 94.87% <92.86%> (+0.07%) ⬆️
internal/ackhandler/sent_packet_handler.go 78.37% <100.00%> (+0.25%) ⬆️
internal/handshake/crypto_setup.go 65.41% <0.00%> (-1.41%) ⬇️
internal/handshake/session_ticket.go 100.00% <0.00%> (ø)
internal/wire/transport_parameters.go 91.57% <0.00%> (+2.40%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marten-seemann marten-seemann merged commit 80c3afe into master Aug 30, 2022
@marten-seemann marten-seemann deleted the fix-packet-pool-usage-non-ack-eliciting branch August 30, 2022 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ackhandler.Packet pool is mostly ineffective
2 participants