[MINOR] pre-compute t->expire in event_accept

At the end of event_accept(), t->expire is computed with tv_min
between two exclusive values. Let's simply assign it at the same
time.
This commit is contained in:
Willy Tarreau 2007-04-29 19:09:47 +02:00
parent 42aae5c7cf
commit 5465e111fd

View File

@ -409,16 +409,19 @@ int event_accept(int fd) {
tv_eternity(&s->req->cex);
tv_eternity(&s->rep->rex);
tv_eternity(&s->rep->wex);
tv_eternity(&t->expire);
if (s->fe->clitimeout) {
if (EV_FD_ISSET(cfd, DIR_RD))
if (EV_FD_ISSET(cfd, DIR_RD)) {
tv_ms_add(&s->req->rex, &now, s->fe->clitimeout);
if (EV_FD_ISSET(cfd, DIR_WR))
t->expire = s->req->rex;
}
if (EV_FD_ISSET(cfd, DIR_WR)) {
tv_ms_add(&s->rep->wex, &now, s->fe->clitimeout);
t->expire = s->req->rex;
}
}
tv_min(&t->expire, &s->req->rex, &s->rep->wex);
task_queue(t);
if (p->mode != PR_MODE_HEALTH)