rpcserver: fix Python gRPC client ALPN property error

There is an open issue for Python gRPC clients that is
currently being debugged https://github.com/grpc/grpc/issues/23172

It can be mitigated server-side by specifying h2 in the metadata header.
This commit is contained in:
Pierre Rochard 2021-04-23 14:56:48 -05:00
parent 3c71603e5b
commit b4666cd56a

View file

@ -344,6 +344,7 @@ func getTLSConfig(cfg *Config) (*tls.Config, *credentials.TransportCredentials,
}
tlsCfg := cert.TLSConfFromCert(certData)
tlsCfg.NextProtos = []string{"h2"}
restCreds, err := credentials.NewClientTLSFromFile(
cfg.TLSCertPath, "",
)