chraft/c-raft — Issue #118: Server disposes clients when it shouldn't
Author: Smjert
Created: 2011-10-25 14:23:53+00:00
State: open
Labels: Bug, High Priority

Sometimes the server finds that clients had no activity for 5 secs or more, so it disconnects them.
The problem is that it disconnects them even when they should be still sending packets and the server should answer them back.
This is partially caused by a wrong update on the nextcheckactivity time and some packets missed by the server (the server doesn't notice some of the packets enqueued to be sent).
I fixed it locally, but there's another issue now, with lots of clients the server often disconnects because it didn't received a keep alive packet in the last 60 secs.
This could be related to the fact that i'm running clients and server on the same machine, so clients doesn't have enough cpu time to read all the other packet (mostly chunks packet) and keepalive one, to send an answer back.
Should investigate more.