diff --git a/cmux.go b/cmux.go index 9de6b0a..1b60e09 100644 --- a/cmux.go +++ b/cmux.go @@ -115,7 +115,8 @@ type cMux struct { func matchersToMatchWriters(matchers []Matcher) []MatchWriter { mws := make([]MatchWriter, 0, len(matchers)) - for _, m := range matchers { + for _, _m := range matchers { + m := _m mws = append(mws, func(w io.Writer, r io.Reader) bool { return m(r) })