From 2b0320ec08cd53997c9e853ed40dc9f6ad721eb4 Mon Sep 17 00:00:00 2001 From: Mrunal Patel Date: Fri, 2 Feb 2018 15:40:27 -0800 Subject: [PATCH] Update cmux to 0.1.4 Signed-off-by: Mrunal Patel --- vendor.conf | 2 +- vendor/github.com/soheilhy/cmux/cmux.go | 3 ++- vendor/github.com/soheilhy/cmux/matchers.go | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/vendor.conf b/vendor.conf index 09997259..320a04be 100644 --- a/vendor.conf +++ b/vendor.conf @@ -107,7 +107,7 @@ github.com/matttproud/golang_protobuf_extensions fc2b8d3a73c4867e51861bbdd5ae3c1 github.com/beorn7/perks 3ac7bf7a47d159a033b107610db8a1b6575507a4 github.com/containerd/cgroups 7a5fdd8330119dc70d850260db8f3594d89d6943 github.com/go-zoo/bone 031b4005dfe248ccba241a0c9de0f9e112fd6b7c -github.com/soheilhy/cmux v0.1.3 +github.com/soheilhy/cmux v0.1.4 github.com/hashicorp/go-multierror 83588e72410abfbe4df460eeb6f30841ae47d4c4 github.com/hashicorp/errwrap 7554cd9344cec97297fa6649b055a8c98c2a1e55 github.com/pquerna/ffjson d49c2bc1aa135aad0c6f4fc2056623ec78f5d5ac diff --git a/vendor/github.com/soheilhy/cmux/cmux.go b/vendor/github.com/soheilhy/cmux/cmux.go index 9de6b0a3..80403423 100644 --- a/vendor/github.com/soheilhy/cmux/cmux.go +++ b/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 diff --git a/vendor/github.com/soheilhy/cmux/matchers.go b/vendor/github.com/soheilhy/cmux/matchers.go index 652fd869..878ae98c 100644 --- a/vendor/github.com/soheilhy/cmux/matchers.go +++ b/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 }