Procházet zdrojové kódy

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.

Shelikhoo před 4 roky
rodič
revize
ebdacfdb86
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      transport/internet/grpc/hub.go

+ 1 - 0
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