Ensure we filter duplicate transports in muxer

Similar to secure transports in config, if we don't add the transport to
the set, we'll never identify duplicates.
This commit is contained in:
Raghav Gulati 2018-08-20 18:18:37 -07:00
parent 8695530d72
commit 3c19cb12b9
No known key found for this signature in database
GPG Key ID: EA2C73F6F7EF2701
1 changed files with 1 additions and 0 deletions

View File

@ -50,6 +50,7 @@ func makeMuxer(h host.Host, tpts []MsMuxC) (mux.Transport, error) {
if _, ok := transportSet[tptC.ID]; ok {
return nil, fmt.Errorf("duplicate muxer transport: %s", tptC.ID)
}
transportSet[tptC.ID] = struct{}{}
}
for _, tptC := range tpts {
tpt, err := tptC.MuxC(h)