mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2024-11-15 10:55:27 +01:00
don't call the blocking .getHostName()
This commit is contained in:
parent
4f884c0a98
commit
bbf35d5828
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user