diff --git a/candidate_host.go b/candidate_host.go index 2a56dde..c7d3266 100644 --- a/candidate_host.go +++ b/candidate_host.go @@ -51,6 +51,9 @@ func NewCandidateHost(config *CandidateHostConfig) (*CandidateHost, error) { if err := c.setIP(ip); err != nil { return nil, err } + } else { + // Until mDNS candidate is resolved assume it is UDPv4 + c.candidateBase.networkType = NetworkTypeUDP4 } return c, nil diff --git a/candidate_test.go b/candidate_test.go index 857cd50..c06885b 100644 --- a/candidate_test.go +++ b/candidate_test.go @@ -274,6 +274,16 @@ func TestCandidateMarshal(t *testing.T) { "1052353102 1 tcp 2128609279 192.168.0.196 0 typ host tcptype active", false, }, + {&CandidateHost{ + candidateBase{ + networkType: NetworkTypeUDP4, + candidateType: CandidateTypeHost, + address: "e2494022-4d9a-4c1e-a750-cc48d4f8d6ee.local", + port: 60542, + }, + "", + }, + "1380287402 1 udp 2130706431 e2494022-4d9a-4c1e-a750-cc48d4f8d6ee.local 60542 typ host", false}, // Invalid candidates {nil, "", true},