diff --git a/stub/src/main/java/io/grpc/kotlin/CoroutineContextServerInterceptor.kt b/stub/src/main/java/io/grpc/kotlin/CoroutineContextServerInterceptor.kt index f81063eb..79c79ef9 100644 --- a/stub/src/main/java/io/grpc/kotlin/CoroutineContextServerInterceptor.kt +++ b/stub/src/main/java/io/grpc/kotlin/CoroutineContextServerInterceptor.kt @@ -16,9 +16,7 @@ import io.grpc.Context as GrpcContext */ abstract class CoroutineContextServerInterceptor : ServerInterceptor { companion object { - // This is deliberately kept visibility-restricted; it's intentional that the only way to affect - // the CoroutineContext is to extend CoroutineContextServerInterceptor. - internal val COROUTINE_CONTEXT_KEY : GrpcContext.Key = + val COROUTINE_CONTEXT_KEY : GrpcContext.Key = GrpcContext.keyWithDefault("grpc-kotlin-coroutine-context", EmptyCoroutineContext) private fun GrpcContext.extendCoroutineContext(coroutineContext: CoroutineContext): GrpcContext {