Skip to content

Commit

Permalink
upgrade grpc to 1.23 (#756) (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
july2993 authored and IANTHEREAL committed Nov 12, 2019
1 parent f4116ae commit eb920fe
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 85 deletions.
5 changes: 4 additions & 1 deletion drainer/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ func (s *Server) Start() error {
return errors.Annotatef(err, "fail to start TCP listener on %s", tcpURL.Host)
}
m := cmux.New(tcpLis)
grpcL := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc"))
grpcL := m.MatchWithWriters(
cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc"),
cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc+proto"),
)
httpL := m.Match(cmux.HTTP1Fast())

// register drainer server with gRPC server and start to serve listener
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ require (
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20190909082730-f460065e899a
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 // indirect
google.golang.org/grpc v1.17.0
google.golang.org/grpc v1.23.0
gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect
)

Expand Down
Loading

0 comments on commit eb920fe

Please sign in to comment.