upstream: fix h3 error handling#496
Open
fakhriaunur wants to merge 1 commit intoAdguardTeam:masterfrom
Open
Conversation
Fix H3_NO_ERROR handling in DNS-over-HTTPS with HTTP/3. When HTTP/3 server closes connection gracefully with H3_NO_ERROR, the client should reset QUIC config to allow proper reconnection. Fixes AdguardTeam#472 Changes: - Add check for http3.ErrCodeNoError in resetClient() - Add table-driven tests for H3_NO_ERROR scenarios - Coverage: 93.8% for modified function Tested: - go test ./upstream/ - PASS - go test -race ./upstream/ - PASS (no races) - go vet ./upstream/ - PASS
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.
Summary
Fix H3_NO_ERROR handling in DNS-over-HTTPS with HTTP/3.
When an HTTP/3 server closes a connection gracefully with
H3_NO_ERROR, the client should handle this error properly and reset the QUIC config to allow proper reconnection. Currently, this error is treated as a failure, causing unnecessary connection resets.Changes
http3.ErrCodeNoErrorinresetClient()methoderrors.As()to unwrap and check for application error codesTesting
Code Change Statistics
Issues
Fixes #472
Checklist
go test ./upstream/)go test -race ./upstream/)go vet ./upstream/)Note: This is a minimal fix following the existing error handling pattern in
resetClient(). The change adds support forhttp3.ErrCodeNoErrorsimilar to howquic.Err0RTTRejectedis already handled.