fix uninitialized response metadata for incoming context (#264)
This commit is contained in:
2
grpc.go
2
grpc.go
@@ -263,7 +263,7 @@ func (g *Server) handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
// create new context
|
||||
ctx = metadata.NewIncomingContext(ctx, md)
|
||||
ctx = metadata.NewOutgoingContext(ctx, metadata.New(0))
|
||||
ctx = context.WithValue(ctx, rspMetadataKey{}, &rspMetadataVal{})
|
||||
ctx = context.WithValue(ctx, rspMetadataKey{}, &rspMetadataVal{m: metadata.New(0)})
|
||||
|
||||
stream = &streamWrapper{ctx, stream}
|
||||
|
||||
|
Reference in New Issue
Block a user