diff --git a/kia-lib/src/main/kotlin/com/faforever/ice/peering/CoturnServer.kt b/kia-lib/src/main/kotlin/com/faforever/ice/peering/CoturnServer.kt index ed828d0..217606d 100644 --- a/kia-lib/src/main/kotlin/com/faforever/ice/peering/CoturnServer.kt +++ b/kia-lib/src/main/kotlin/com/faforever/ice/peering/CoturnServer.kt @@ -9,5 +9,12 @@ data class CoturnServer( val username: String? = null, val credential: String? = null, ) { - fun toUDPTransport() = TransportAddress(uri.host, uri.port, Transport.UDP) + companion object { + const val DEFAULT_PORT = 3478 + } + + fun toUDPTransport() = TransportAddress( + uri.host, + if(uri.port == -1) DEFAULT_PORT else uri.port, + Transport.UDP) }