network monitor now disables itself when not being able to read system stats properly

This commit is contained in:
Elias Müller 2024-09-27 17:09:45 +02:00
parent e5ff3d36fa
commit 05e88845be

View File

@ -78,7 +78,8 @@ public class NetworkMonitor {
String content = new String(Files.readAllBytes(Paths.get(path)));
return Long.parseLong(content.trim());
} catch(IOException e) {
throw new RuntimeException("Failed recieving Network statistic", e);
this.stop();
throw new RuntimeException("Failed receiving Network statistic, disabling statistics!", e);
}
}
}