Update cmux to 0.1.4

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2018-02-02 15:40:27 -08:00
parent e38e1e4473
commit 2b0320ec08
3 changed files with 8 additions and 2 deletions

View file

@ -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