Dieser Commit ist enthalten in:
Ursprung
0c9048c346
Commit
d6f1d51bad
@ -61,11 +61,11 @@ public class CrashDetector {
|
|||||||
while (run) {
|
while (run) {
|
||||||
long curTime = System.nanoTime();
|
long curTime = System.nanoTime();
|
||||||
if(curTime - 4*TIMEOUT >= lastTick.get()) {
|
if(curTime - 4*TIMEOUT >= lastTick.get()) {
|
||||||
SWException.log("Server did not recover in " + (curTime - lastTick.get()) + "ms, unclean server stop", "");
|
SWException.log("Server did not recover in " + ((curTime - lastTick.get()) / 1000000.0) + "ms, unclean server stop", "");
|
||||||
hardStop();
|
hardStop();
|
||||||
} else if(curTime - TIMEOUT > lastMessage.get()) {
|
} else if(curTime - TIMEOUT > lastMessage.get()) {
|
||||||
if(mainThread.isAlive()) {
|
if(mainThread.isAlive()) {
|
||||||
SWException.log("Server hung for " + (curTime - lastTick.get()) + "ms", Arrays.stream(mainThread.getStackTrace()).map(StackTraceElement::toString).collect(Collectors.joining("\n")));
|
SWException.log("Server hung for " + ((curTime - lastTick.get()) / 1000000.0) + "ms", Arrays.stream(mainThread.getStackTrace()).map(StackTraceElement::toString).collect(Collectors.joining("\n")));
|
||||||
} else {
|
} else {
|
||||||
SWException.log("Server thread already dead, unclean server stop", "Core enabled: " + Core.getInstance().isEnabled());
|
SWException.log("Server thread already dead, unclean server stop", "Core enabled: " + Core.getInstance().isEnabled());
|
||||||
hardStop();
|
hardStop();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren