Skip to content

Commit

Permalink
Fix http3 in go1.21(#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Aug 28, 2023
1 parent 93b933a commit 011c0c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,9 @@ func (t *Transport) DisableH2C() *Transport {
// (disabled by default).
func (t *Transport) EnableForceHTTP3() *Transport {
t.EnableHTTP3()
t.forceHttpVersion = h3
if t.t3 != nil {
t.forceHttpVersion = h3
}
return t
}

Expand Down Expand Up @@ -580,7 +582,7 @@ func (t *Transport) EnableHTTP3() {
}
return
}
if !(minorVersion >= 18 && minorVersion <= 20) {
if !(minorVersion >= 20 && minorVersion <= 21) {
if t.Debugf != nil {
t.Debugf("%s is not support http3", v)
}
Expand Down

0 comments on commit 011c0c2

Please sign in to comment.