fix(lib): remove deprecated net.Error.Temporary() from the proxy accept loop - #565
Open
0xrlawrence wants to merge 1 commit into
Open
fix(lib): remove deprecated net.Error.Temporary() from the proxy accept loop#5650xrlawrence wants to merge 1 commit into
0xrlawrence wants to merge 1 commit into
Conversation
…pt loop net.Error.Temporary() has been deprecated since Go 1.18 because its semantics are not well defined, and staticcheck reports it as SA1019. In this accept loop the call was also dead: both the 'temporary' branch and the fall-through did exactly the same thing — log a warning, sleep 50ms, and continue — differing only in the wording of the log line. Deliberate shutdown is already handled by the ctx.Done() check immediately above. Collapsed to the single retry path. No behaviour change beyond one log message no longer being labelled 'temporary'.
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.
Description
net.Error.Temporary()has been deprecated since Go 1.18 because its semantics are not well defined. staticcheck reports it as SA1019.In this accept loop the call was also dead code. Both branches did exactly the same thing — log a warning, sleep 50ms, continue — differing only in the wording of the log line:
Deliberate shutdown is already handled by the
ctx.Done()check immediately above.Changes Made
Testing
go build ./...go test ./lib/passeslib/peer.go:542No behaviour change beyond one log message no longer being labelled "temporary".
🤖 Generated with Claude Code