Skip to content

Commit

Permalink
Fix gRPC query service cmux
Browse files Browse the repository at this point in the history
breaking change: grpc/grpc-go#2406
workaround described in:
- soheilhy/cmux#64
- https://github.com/soheilhy/cmux#limitations

Signed-off-by: Christian Weichel <christian.weichel@typefox.io>
  • Loading branch information
Christian Weichel authored and Yuri Shkuro committed Aug 25, 2019
1 parent 4978c15 commit 8c19517
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/query/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 8c19517

Please sign in to comment.