Skip to content

Commit 1d231a9

Browse files
committed
grpc: Address PR comment
Signed-off-by: Johannes Zottele <[email protected]>
1 parent 79c5bca commit 1d231a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

grpc/grpc-core/src/nativeMain/kotlin/kotlinx/rpc/grpc/internal/NativeManagedChannel.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ internal class NativeManagedChannel(
6464

6565
internal val raw: CPointer<grpc_channel> = memScoped {
6666
val args = authority?.let {
67-
var authorityOverride = alloc<grpc_arg> {
67+
// the C Core API doesn't have a way to override the authority (used for TLS SNI) as it
68+
// is available in the Java gRPC implementation.
69+
// instead, it can be done by setting the "grpc.ssl_target_name_override" argument.
70+
val authorityOverride = alloc<grpc_arg> {
6871
type = grpc_arg_type.GRPC_ARG_STRING
6972
key = "grpc.ssl_target_name_override".cstr.ptr
7073
value.string = authority.cstr.ptr

0 commit comments

Comments
 (0)