Ensure duplicate transports are filtered
Without adding the transport to the set, we'll never identify if there
are duplicates in the slice of secure transports provided by the config.
@@ -61,6 +61,7 @@ func makeSecurityTransport(h host.Host, tpts []MsSecC) (security.Transport, erro
if _, ok := transportSet[tptC.ID]; ok {
return nil, fmt.Errorf("duplicate security transport: %s", tptC.ID)
}
+ transportSet[tptC.ID] = tptC
}
for _, tptC := range tpts {
tpt, err := tptC.SecC(h)
