MCMrARM / mcpelauncher-linux

Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
312 stars 46 forks source link

[server] cpu usage is always at 100% #292

Closed julianwi closed 6 years ago

julianwi commented 6 years ago

If i use the gnu top command while the dedicated server is running it reports 100% cpu usage for it. Even if no player is connected to the server. I can workaround it by adding

usleep(50000);

to the main loop of server.cpp. I think the launcher should look if the call to processCoroutines took less then 50 milliseconds and then sleep the remaining time.

MCMrARM commented 6 years ago

Fixed with https://github.com/MCMrARM/mcpelauncher-linux/commit/d8245d96694f79c3ceccf12caa98879545659b80