From e211fb6fb13266f046880594586a34a9d4d9aadc Mon Sep 17 00:00:00 2001 From: Christian Weichel Date: Fri, 23 Aug 2019 11:24:55 +0000 Subject: [PATCH] Fix gRPC query service cmux breaking change: https://github.com/grpc/grpc-go/issues/2406 workaround described in: - https://github.com/soheilhy/cmux/issues/64 - https://github.com/soheilhy/cmux#limitations Signed-off-by: Christian Weichel --- cmd/query/app/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/query/app/server.go b/cmd/query/app/server.go index 5d2841aac74..2d81ba9f0cf 100644 --- a/cmd/query/app/server.go +++ b/cmd/query/app/server.go @@ -102,9 +102,7 @@ func (s *Server) Start() error { // cmux server acts as a reverse-proxy between HTTP and GRPC backends. cmuxServer := cmux.New(s.conn) - grpcListener := cmuxServer.Match( - cmux.HTTP2HeaderField("content-type", "application/grpc"), - cmux.HTTP2HeaderField("content-type", "application/grpc+proto")) + grpcListener := cmuxServer.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc")) httpListener := cmuxServer.Match(cmux.Any()) go func() {