Skip to content

Commit

Permalink
Update src/server.c
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Brunner <[email protected]>
  • Loading branch information
JimB123 authored Jan 23, 2025
1 parent 82b1d18 commit 0264c99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,10 +1112,11 @@ static void clientsCron(int clients_this_cycle) {

/* A periodic timer that performs client maintenance.
* This cron task follows the following rules:
* - All clients need to be checked (at least) once per second
* - To manage latency, we don't check more than MAX_CLIENTS_PER_CLOCK_TICK at a time
* - The minimum rate will be defined by server.hz
* - The maxmum rate will be defined by CONFIG_MAX_HZ
* - At least CLIENTS_CRON_MIN_ITERATIONS will be performed each cycle
* - All clients need to be checked (at least) once per second (if possible given other constraints)
*/
#define CLIENTS_CRON_MIN_ITERATIONS 5
long long clientsTimerProc(struct aeEventLoop *eventLoop, long long id, void *clientData) {
Expand Down

0 comments on commit 0264c99

Please sign in to comment.