Skip to content

Commit

Permalink
Fix checking imager uptime
Browse files Browse the repository at this point in the history
  • Loading branch information
Quackster committed Jan 22, 2023
1 parent 6f202e2 commit 5389deb
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,22 @@ public void run() {
}
}


if (this.counter.get() % 30 == 0) {
try {

String imagerPath = ServerConfiguration.getString("site.imaging.path");
String imagerPath = GameConfiguration.getInstance().getString("site.imaging.path");

if (!imagerPath.isBlank()) {
try {
URL url = new URL(imagerPath);
String hostname = url.getHost();
int port = url.getPort() == -1 ? url.getPort() : 80;
int port = url.getPort() == -1 ? 80 : url.getPort();

IS_IMAGER_ONLINE = isServerOnline(hostname, port);
} catch (MalformedURLException e) { }
} catch (MalformedURLException e) {
e.printStackTrace();
}

}

Expand Down

0 comments on commit 5389deb

Please sign in to comment.