Compare commits

...

2 Commits

Author SHA1 Message Date
abe03a9b7b Merge remote-tracking branch 'origin/master'
All checks were successful
Fetch new Pia Servers / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 20s
2024-04-27 08:49:22 +01:00
9ee1999bec fix last seen 2024-04-27 08:49:17 +01:00
2 changed files with 7 additions and 1 deletions

View File

@ -2,10 +2,11 @@ package cc.fascinated.piaservers.model;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;
@AllArgsConstructor @Getter
@AllArgsConstructor @Getter @Setter
public class PiaServer {
/**
* The IP of this server.

View File

@ -55,6 +55,11 @@ public class PiaManager {
SERVERS.removeAll(toRemove); // Remove the servers
System.out.printf("Removed %s old servers\n", toRemove.size());
// Update the last seen time for all the servers
for (PiaServer server : SERVERS) {
server.setLastSeen(new Date());
}
// Add the new servers to the list
for (PiaServerToken serverToken : piaDomain) {
InetAddress address = InetAddress.getByName(serverToken.getHostname());