63
}
64
65
>
func (c *ContextMetadataInterceptor) appendContextMetadataToTrailer(ctx context.Context, info *grpc.UnaryServerInfo) {
context_metadata_interceptor.go
66
>
// If the context is done, the gRPC stream may already be in streamDone state,
67
>
// and SetTrailer would return ErrIllegalHeaderWrite ("SendHeader called multiple times").
68
>
select {
69
case <-ctx.Done():
70
return
72
}
73
75
>
if len(allMetadata) == 0 {
76
c.throttledLogger.Info("ContextMetadataInterceptor: No metadata in context, not setting trailer",
77
tag.NewStringTag("fullMethod", info.FullMethod),