瀏覽代碼

vendor: upgrade "soheilhy/cmux" to "v0.1.4"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 年之前
父節點
當前提交
f54ede4723
共有 3 個文件被更改,包括 9 次插入3 次删除
  1. 2 2
      Gopkg.lock
  2. 2 1
      vendor/github.com/soheilhy/cmux/cmux.go
  3. 5 0
      vendor/github.com/soheilhy/cmux/matchers.go

+ 2 - 2
Gopkg.lock

@@ -203,8 +203,8 @@
 [[projects]]
   name = "github.com/soheilhy/cmux"
   packages = ["."]
-  revision = "bb79a83465015a27a175925ebd155e660f55e9f1"
-  version = "v0.1.3"
+  revision = "e09e9389d85d8492d313d73d1469c029e710623f"
+  version = "v0.1.4"
 
 [[projects]]
   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 {
 	mws := make([]MatchWriter, 0, len(matchers))
 	for _, m := range matchers {
+		cm := m
 		mws = append(mws, func(w io.Writer, r io.Reader) bool {
-			return m(r)
+			return cm(r)
 		})
 	}
 	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) {
 		case *http2.SettingsFrame:
+			// Sender acknoweldged the SETTINGS frame. No need to write
+			// SETTINGS again.
+			if f.IsAck() {
+				break
+			}
 			if err := framer.WriteSettings(); err != nil {
 				return false
 			}