only send tps that is under 20
This commit is contained in:
parent
468a829a8a
commit
801bcbffbc
1 changed files with 9 additions and 7 deletions
|
@ -69,13 +69,15 @@ public class Ctserver implements ModInitializer {
|
|||
//LOGGER.info(String.valueOf(timeBetween));
|
||||
//LOGGER.info(String.valueOf(mspt));
|
||||
//LOGGER.info(String.valueOf(tps));
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
sendPostRequest("http://us-ky-medium-0004.knijn.one:58926/tps", String.valueOf(tps));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Failed to send POST request", e);
|
||||
}
|
||||
});
|
||||
if (tps < 20) {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
sendPostRequest("http://us-ky-medium-0004.knijn.one:58926/tps", String.valueOf(tps));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Failed to send POST request", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
//LOGGER.info("Sent HTTP request");
|
||||
tickCounter = 0;
|
||||
zeroTicks = Instant.now().toEpochMilli();
|
||||
|
|
Loading…
Reference in a new issue