mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-03 05:51:28 +01: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) {
|
public void cacheAnalysisHtml(String html) {
|
||||||
if (usingAnotherWebServer) {
|
if (usingAnotherWebServer) {
|
||||||
try {
|
try {
|
||||||
getWebAPI().getAPI(PostHtmlWebAPI.class).sendAnalysisHtml(webServerAddress, getAnalysisHtml());
|
getWebAPI().getAPI(PostHtmlWebAPI.class).sendAnalysisHtml(webServerAddress, html);
|
||||||
} catch (WebAPIException e) {
|
} catch (WebAPIException e) {
|
||||||
attemptConnection();
|
attemptConnection();
|
||||||
cacheAnalysisHtml();
|
cacheAnalysisHtml();
|
||||||
|
@ -98,6 +98,7 @@ public class BungeeServerInfoManager {
|
|||||||
connectedToServer(server);
|
connectedToServer(server);
|
||||||
return true;
|
return true;
|
||||||
} catch (WebAPIException e) {
|
} catch (WebAPIException e) {
|
||||||
|
Log.debug(e.toString());
|
||||||
serverHasGoneOffline(server.getUuid());
|
serverHasGoneOffline(server.getUuid());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,11 @@ public abstract class Consumer<T> extends AbsRunnable {
|
|||||||
|
|
||||||
protected void stop() {
|
protected void stop() {
|
||||||
run = false;
|
run = false;
|
||||||
super.cancel();
|
try {
|
||||||
|
super.cancel();
|
||||||
|
} catch (NullPointerException ignore) {
|
||||||
|
/*ignored*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void clearVariables();
|
protected abstract void clearVariables();
|
||||||
|
@ -187,6 +187,7 @@ public class WebServer {
|
|||||||
if (server != null) {
|
if (server != null) {
|
||||||
server.stop(0);
|
server.stop(0);
|
||||||
}
|
}
|
||||||
|
enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getProtocol() {
|
public String getProtocol() {
|
||||||
|
Loading…
Reference in New Issue
Block a user