Fixed WebServer Shutting down after receiving Ping from Bungee

This commit is contained in:
Rsl1122 2017-10-02 18:46:30 +03:00
parent d27b71e112
commit 4cc28e3004
4 changed files with 8 additions and 2 deletions

View File

@ -247,7 +247,7 @@ public class BukkitInformationManager extends InformationManager {
public void cacheAnalysisHtml(String html) {
if (usingAnotherWebServer) {
try {
getWebAPI().getAPI(PostHtmlWebAPI.class).sendAnalysisHtml(webServerAddress, getAnalysisHtml());
getWebAPI().getAPI(PostHtmlWebAPI.class).sendAnalysisHtml(webServerAddress, html);
} catch (WebAPIException e) {
attemptConnection();
cacheAnalysisHtml();

View File

@ -98,6 +98,7 @@ public class BungeeServerInfoManager {
connectedToServer(server);
return true;
} catch (WebAPIException e) {
Log.debug(e.toString());
serverHasGoneOffline(server.getUuid());
return false;
}

View File

@ -42,7 +42,11 @@ public abstract class Consumer<T> extends AbsRunnable {
protected void stop() {
run = false;
super.cancel();
try {
super.cancel();
} catch (NullPointerException ignore) {
/*ignored*/
}
}
protected abstract void clearVariables();

View File

@ -187,6 +187,7 @@ public class WebServer {
if (server != null) {
server.stop(0);
}
enabled = false;
}
public String getProtocol() {