Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit f855869

Browse files
draffenspergersongy23
authored andcommitted
Fix grpc-gateway after grpc 1.18 upgrade (#501)
1 parent 92fed7f commit f855869

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

receiver/opencensusreceiver/opencensus.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ func (ocr *Receiver) startServer() error {
262262

263263
// Start the gRPC and HTTP/JSON (grpc-gateway) servers on the same port.
264264
m := cmux.New(ocr.ln)
265-
grpcL := m.Match(
266-
cmux.HTTP2HeaderField("content-type", "application/grpc"),
267-
cmux.HTTP2HeaderField("content-type", "application/grpc+proto"))
265+
grpcL := m.MatchWithWriters(
266+
cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc"),
267+
cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc+proto"))
268268

269269
httpL := m.Match(cmux.Any())
270270
go func() {

0 commit comments

Comments
 (0)