Browse Source

Merge pull request #9497 from gyuho/cmux

vendor: upgrade "soheilhy/cmux" to "v0.1.4"
Gyuho Lee 7 years ago
parent
commit
053bab06db

+ 1 - 0
CHANGELOG-3.4.md

@@ -65,6 +65,7 @@ See [code changes](https://github.com/coreos/etcd/compare/v3.3.0...v3.4.0) and [
 ### Dependency
 ### Dependency
 
 
 - TODO: Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.7.5`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.5) to [**`v1.11.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.11.0).
 - TODO: Upgrade [`google.golang.org/grpc`](https://github.com/grpc/grpc-go/releases) from [**`v1.7.5`**](https://github.com/grpc/grpc-go/releases/tag/v1.7.5) to [**`v1.11.0`**](https://github.com/grpc/grpc-go/releases/tag/v1.11.0).
+- Upgrade [`github.com/soheilhy/cmux`](https://github.com/soheilhy/cmux/releases) from [**`v0.1.3`**](https://github.com/soheilhy/cmux/releases/tag/v0.1.3) to [**`v0.1.4`**](https://github.com/soheilhy/cmux/releases/tag/v0.1.4).
 
 
 ### Metrics, Monitoring
 ### Metrics, Monitoring
 
 

+ 2 - 2
Gopkg.lock

@@ -203,8 +203,8 @@
 [[projects]]
 [[projects]]
   name = "github.com/soheilhy/cmux"
   name = "github.com/soheilhy/cmux"
   packages = ["."]
   packages = ["."]
-  revision = "bb79a83465015a27a175925ebd155e660f55e9f1"
-  version = "v0.1.3"
+  revision = "e09e9389d85d8492d313d73d1469c029e710623f"
+  version = "v0.1.4"
 
 
 [[projects]]
 [[projects]]
   name = "github.com/spf13/cobra"
   name = "github.com/spf13/cobra"

+ 2 - 1
vendor/github.com/soheilhy/cmux/cmux.go

@@ -116,8 +116,9 @@ type cMux struct {
 func matchersToMatchWriters(matchers []Matcher) []MatchWriter {
 func matchersToMatchWriters(matchers []Matcher) []MatchWriter {
 	mws := make([]MatchWriter, 0, len(matchers))
 	mws := make([]MatchWriter, 0, len(matchers))
 	for _, m := range matchers {
 	for _, m := range matchers {
+		cm := m
 		mws = append(mws, func(w io.Writer, r io.Reader) bool {
 		mws = append(mws, func(w io.Writer, r io.Reader) bool {
-			return m(r)
+			return cm(r)
 		})
 		})
 	}
 	}
 	return mws
 	return mws

+ 5 - 0
vendor/github.com/soheilhy/cmux/matchers.go

@@ -240,6 +240,11 @@ func matchHTTP2Field(w io.Writer, r io.Reader, name string, matches func(string)
 
 
 		switch f := f.(type) {
 		switch f := f.(type) {
 		case *http2.SettingsFrame:
 		case *http2.SettingsFrame:
+			// Sender acknoweldged the SETTINGS frame. No need to write
+			// SETTINGS again.
+			if f.IsAck() {
+				break
+			}
 			if err := framer.WriteSettings(); err != nil {
 			if err := framer.WriteSettings(); err != nil {
 				return false
 				return false
 			}
 			}