Repository navigation
fix(tcpreuse): handle connection that failed to be sampled - #3036
Merged
Merged
Conversation
aschmahmann
force-pushed
the
fix/tcpreuse
branch
from
November 12, 2024 04:53
279be8d to
6eae9ab
Compare
aschmahmann
marked this pull request as draft
November 12, 2024 05:04
MarcoPolo
reviewed
Nov 12, 2024
| return 0, nil, errors.Join(err, closeErr) | ||
| } | ||
|
|
||
| s, c, err := sampledconn.PeekBytes(c) |
Collaborator
There was a problem hiding this comment.
These changes aren't necessary, right? It's also not a peekableConn. It's just a manet.Conn. If you want to rename, i would rename the parameter.
Collaborator
There was a problem hiding this comment.
Ah, I see. This shadows the c in L53.
Collaborator
|
The issue was that the returned connection may be nil when an error is returned, right? |
Collaborator
|
https://github.com/uber-go/nilaway Seems promising, but not sure if it would have caught this issue. |
MarcoPolo
marked this pull request as ready for review
November 12, 2024 23:22
MarcoPolo
approved these changes
Nov 12, 2024
MarcoPolo
force-pushed
the
fix/tcpreuse
branch
from
November 18, 2024 22:39
0dc888b to
5b834c7
Compare
MarcoPolo
force-pushed
the
fix/tcpreuse
branch
from
November 21, 2024 00:27
5b834c7 to
a1ea5af
Compare
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.
There was an oversight here in the error reporting. A test should be added, but also probably this should've been caught by automated tooling (e.g. one of the linters), maybe there are more we should be enabling.