don't call the blocking .getHostName()

This commit is contained in:
creeper123123321 2021-06-15 17:10:41 -03:00 committed by GitHub
parent 4f884c0a98
commit bbf35d5828
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,8 +147,7 @@ fun checkLocalAddress(inetAddress: InetAddress): Boolean {
}
fun matchesAddress(addr: InetSocketAddress, list: List<String>): Boolean {
return (matchAddress(addr.hostString, list) || (addr.address != null
&& (matchAddress(addr.address.hostAddress, list) || matchAddress(addr.address.hostName, list))))
return matchAddress(addr.hostString, list) || (addr.address != null && matchAddress(addr.address.hostAddress, list))
}
private fun matchAddress(addr: String, list: List<String>): Boolean {