login: randomize initial keepalive time

This commit is contained in:
Heikki Hannikainen 2012-10-11 18:38:18 +03:00
parent 39f8f43b64
commit 95493b5fd0
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ int login_handler(struct worker_t *self, struct client_t *c, int l4proto, char *
if (rc < -2)
return rc; // The client probably got destroyed!
c->keepalive = now + keepalive_interval;
c->keepalive = now + keepalive_interval/2 + random() % keepalive_interval;
c->state = CSTATE_CONNECTED;
hlog(LOG_DEBUG, "%s: login '%s'%s%s%s%s%s%s%s%s",