Fixed CPU lockup if client disconnects unexpectedly