-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Bug reports:
when using RegisterXXXHandlerServer
rather than RegisterXXXHandlerFromEndpoint
calling grpc.SendHeader
returns following error
rpc error: code = Internal desc = grpc: failed to fetch the stream from the context context.Background.WithValue(type *http.contextKey, val <not Stringer>).WithValue(type *http.contextKey, val 127.0.0.1:8081).WithCancel.WithCancel.WithCancel.WithValue(type metadata.mdIncomingKey, val <not Stringer>)
Steps you follow to reproduce the error:
register any gateway with RegisterXXXHandlerServer
and try send header grpc.SendHeader
in service.
What did you expect to happen instead:
causes no error
What's your theory on why it isn't working:
grpc.ServerTransportStream
was not attached to context when calling service methods directly within memory