commit - 5e25db14db9eb20ee11b68048b45b3e0f54d50eb
commit + ef4e2f01b0bff14f003a72321ce0165a0df72fa1
blob - 2ae681053c360d76a04ee62d816fbcb536e57c4b
blob + 4e693a39b4414ee735aa6d7f2649143c79ce3a88
--- gotd/gotd.c
+++ gotd/gotd.c
static SIPHASH_KEY clients_hash_key;
volatile int client_cnt;
static struct timeval timeout = { 3600, 0 };
+static struct timeval auth_timeout = { 5, 0 };
static struct gotd gotd;
void gotd_sighdlr(int sig, short event, void *arg);
disconnect_on_error(client, err);
} else {
gotd_imsg_event_add(&client->iev);
- evtimer_add(&client->tmo, &timeout);
+ if (client->state == GOTD_STATE_EXPECT_LIST_REFS)
+ evtimer_add(&client->tmo, &auth_timeout);
+ else
+ evtimer_add(&client->tmo, &timeout);
}
}
{
struct gotd_child_proc *proc;
struct gotd_imsg_auth iauth;
- struct timeval auth_timeout = { 5, 0 };
memset(&iauth, 0, sizeof(iauth));
client->auth = proc;
client->required_auth = required_auth;
- evtimer_add(&client->tmo, &auth_timeout);
return NULL;
}