fix: Remove fatal error for non-erroneous case#2555
Merged
Green-Sky merged 1 commit intoTokTok:masterfrom Jan 13, 2024
Merged
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2555 +/- ##
==========================================
+ Coverage 68.27% 68.29% +0.01%
==========================================
Files 118 118
Lines 28162 28162
==========================================
+ Hits 19227 19232 +5
+ Misses 8935 8930 -5 ☔ View full report in Codecov by Sentry. |
6ecb9a6 to
6d0dbb5
Compare
commit 5b9c420 introduced some undesirable behaviour with packet send functions returning error when they shouldn't. We now only return an error if the packet fails to be added to the send queue or cannot be wrapped/encrypted. We no longer error if we fail to send the packet over the wire, because toxcore will keep trying to re-send the packet until the connection times out. Additionally, we now make sure that our packet broadcast functions aren't returning an error when failing to send packets to peers that we have not successfully handshaked with yet, since this is expected behaviour.
6d0dbb5 to
07fe665
Compare
Green-Sky
approved these changes
Jan 13, 2024
Member
Green-Sky
left a comment
There was a problem hiding this comment.
I still dont thing zero sized arrays should be non-null, but I want master working again.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We allow non-null data pointers to be passed to functions alongside 0-length data. For example when creating a data buffer that has room for the entire packet, including ignored header data.
This error broke a rare but legitimate case where we miss packets during a handshake attempt and need to store empty handshake packets in the packet array.
This change is