ferrumc-rs / ferrumc

A reimplementation of the minecraft server in rust.
MIT License
1.04k stars 31 forks source link

added a 100ms sleep to the keep alive system to prevent it from having excessive cpu usage #117

Closed AnonymousBit0111 closed 1 week ago

0xnim commented 2 weeks ago

The keepalive system should be 15sec, 15000ms

Sweattypalms commented 2 weeks ago

^ There is no point checking keepalive every 100ms. Since keepalive typically runs every 30 seconds, checking every 15 seconds ensures we catch all players' status even if they join right after a check, while still being far more efficient than checking every 100ms.

AnonymousBit0111 commented 2 weeks ago

119 should be fixed now can you please check @0xnim , I'm not sure how to simulate a client timing out

0xnim commented 1 week ago

@AnonymousBit0111 another issue has occured, only a single player can join