Merge pull request #166 from tsightler/udp-candidate-fix
Fix invalid tcpType for UDP candidate
This commit is contained in:
@@ -25,12 +25,17 @@ func NewCandidate(network, address string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
tcpType := ice.TCPTypeUnspecified
|
||||
if network == "tcp" {
|
||||
tcpType = ice.TCPTypePassive
|
||||
}
|
||||
|
||||
cand, err := ice.NewCandidateHost(&ice.CandidateHostConfig{
|
||||
Network: network,
|
||||
Address: host,
|
||||
Port: i,
|
||||
Component: ice.ComponentRTP,
|
||||
TCPType: ice.TCPTypePassive,
|
||||
TCPType: tcpType,
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user