only take udp candidates from transport-info

This commit is contained in:
Daniel Gultsch 2020-04-25 20:13:08 +02:00
parent 45bb86c0f6
commit c41033e83c
1 changed files with 3 additions and 0 deletions

View File

@ -194,6 +194,9 @@ public class IceUdpTransportInfo extends GenericTransportInfo {
checkNotNullNoWhitespace(component, "component"); checkNotNullNoWhitespace(component, "component");
final String transport = this.getAttribute("protocol"); final String transport = this.getAttribute("protocol");
checkNotNullNoWhitespace(transport, "protocol"); checkNotNullNoWhitespace(transport, "protocol");
if (!"udp".equals(transport)) {
throw new IllegalArgumentException(String.format("'%s' is not a supported protocol", transport));
}
final String priority = this.getAttribute("priority"); final String priority = this.getAttribute("priority");
checkNotNullNoWhitespace(priority, "priority"); checkNotNullNoWhitespace(priority, "priority");
final String connectionAddress = this.getAttribute("ip"); final String connectionAddress = this.getAttribute("ip");