Check link is grpc

This commit is contained in:
Asim Aslam 2020-01-03 19:46:14 +00:00
parent 4e2339749c
commit 1af82df8b1

View File

@ -490,7 +490,8 @@ func (p *Proxy) serveRequest(ctx context.Context, link client.Client, service, e
defer stream.Close()
// if we receive a grpc stream we have to refire the initial request
if c, ok := req.Codec().(codec.Codec); ok && c.String() == "grpc" {
c, ok := req.Codec().(codec.Codec)
if ok && c.String() == "grpc" && link.String() == "grpc" {
// get the header from client
hdr := req.Header()
msg := &codec.Message{