chore: remove the usage of some deprecated tls properties

This commit is contained in:
Allo 2024-04-13 13:29:34 +08:00 committed by yuhan6665
parent fc41874508
commit fbc56b88da
6 changed files with 45 additions and 44 deletions

View file

@ -97,13 +97,10 @@ func getHTTPClient(ctx context.Context, dest net.Destination, streamSettings *in
return nil, err
}
}
negotiatedProtocol, negotiatedProtocolIsMutual := cn.NegotiatedProtocol()
negotiatedProtocol := cn.NegotiatedProtocol()
if negotiatedProtocol != http2.NextProtoTLS {
return nil, newError("http2: unexpected ALPN protocol " + negotiatedProtocol + "; want q" + http2.NextProtoTLS).AtError()
}
if !negotiatedProtocolIsMutual {
return nil, newError("http2: could not negotiate protocol mutually").AtError()
}
return cn, nil
},
}