From ebdacfdb86b683b751e39bfb833414414f9682cd Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Fri, 3 Sep 2021 21:34:34 +0100 Subject: [PATCH] add comment for gRPC TLS silent failure behavior When gRPC transport have been configured to use TLS, it may silently ignore TLS failure. This may make it harder to diagnose TLS setting issues when gRPC transport is used. This comment is added to help other developers be aware of this caveat. --- transport/internet/grpc/hub.go | 1 + 1 file changed, 1 insertion(+) diff --git a/transport/internet/grpc/hub.go b/transport/internet/grpc/hub.go index ee8db11d0..c466e2d0e 100644 --- a/transport/internet/grpc/hub.go +++ b/transport/internet/grpc/hub.go @@ -75,6 +75,7 @@ func Listen(ctx context.Context, address net.Address, port net.Port, settings *i if config == nil { s = grpc.NewServer() } else { + // gRPC server may silently ignore TLS errors s = grpc.NewServer(grpc.Creds(credentials.NewTLS(config.GetTLSConfig(tls.WithNextProto("h2"))))) } listener.s = s