Adding logs to track overheating

This commit is contained in:
David Négrier 2020-09-30 14:42:35 +02:00
parent 57262de1bf
commit a8bbe04cae
3 changed files with 19 additions and 2 deletions

View file

@ -419,7 +419,7 @@ export class IoSocketController {
const userMoves = userMovesMessage.toObject();
// If CPU is high, let's drop messages of users moving (we will only dispatch the final position)
if (cpuTracker.getCpuPercent() > 80 && userMoves.position?.moving === true) {
if (cpuTracker.isOverHeating() && userMoves.position?.moving === true) {
return;
}