mirror of
https://github.com/soheilhy/cmux.git
synced 2025-01-18 10:53:46 +08:00
Fix bug matchers are ignored except last one
This commit is contained in:
parent
be5b383fd5
commit
e96bd75f84
3
cmux.go
3
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)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user