mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-15 05:41:51 +08:00
Fixed WebServer Shutting down after receiving Ping from Bungee
This commit is contained in:
parent
d27b71e112
commit
4cc28e3004
@ -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();
|
||||
|
@ -98,6 +98,7 @@ public class BungeeServerInfoManager {
|
||||
connectedToServer(server);
|
||||
return true;
|
||||
} catch (WebAPIException e) {
|
||||
Log.debug(e.toString());
|
||||
serverHasGoneOffline(server.getUuid());
|
||||
return false;
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -187,6 +187,7 @@ public class WebServer {
|
||||
if (server != null) {
|
||||
server.stop(0);
|
||||
}
|
||||
enabled = false;
|
||||
}
|
||||
|
||||
public String getProtocol() {
|
||||
|
Loading…
Reference in New Issue
Block a user