Fix performance

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
Leo Siepel 2024-12-24 13:42:24 +01:00
parent f45f29f920
commit 6b42d75378
No known key found for this signature in database
GPG Key ID: E3035441D9FCD768

View File

@ -139,7 +139,7 @@ public class NetworkUtils {
try {
for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
NetworkInterface networkInterface = en.nextElement();
if (!networkInterface.isLoopback()) {
if (networkInterface.isUp() && !networkInterface.isLoopback()) {
result.add(networkInterface.getName());
}
}