Fix not deleting bootstrap hubs

This commit is contained in:
Ben van Hartingsveldt 2024-12-02 11:32:40 +01:00
parent a1c6a29eea
commit dc0e56ea2a
No known key found for this signature in database
GPG key ID: 261AA214130CE7AB

View file

@ -78,7 +78,16 @@ public class HubNodeFinderThread implements Runnable{
} }
} }
for(InetAddress removeIP : removeIPs){ for(InetAddress removeIP : removeIPs){
boolean isBootstrap = false;
for(String bootstrap : HubNodeFinderThread.HUBS){
if(bootstrap.equalsIgnoreCase(removeIP.getHostName())){
isBootstrap = true;
break;
}
}
if(!isBootstrap){
HubNodeFinderThread.LAST_SEEN.remove(removeIP); HubNodeFinderThread.LAST_SEEN.remove(removeIP);
}
Node n = API.NODES.get(removeIP); Node n = API.NODES.get(removeIP);
if(n!=null){ if(n!=null){
List<Service> removeServices = new ArrayList<>(); List<Service> removeServices = new ArrayList<>();