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 committed Aug 23, 2019
1 parent 11d7631 commit e211fb6
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 e211fb6

Please sign in to comment.