mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 15:47:01 +02:00
[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:
parent
42aae5c7cf
commit
5465e111fd
13
src/client.c
13
src/client.c
@ -409,15 +409,18 @@ 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))
|
||||
tv_ms_add(&s->rep->wex, &now, s->fe->clitimeout);
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user