mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 14:21:00 +01:00
[MINOR] accept: count the incoming connection earlier
Right now we count the incoming connection only once everything has been allocated. Since we're planning on considering early ACL rules, we need to count the connection earlier.
This commit is contained in:
parent
06457871a4
commit
a93c4bbdb7
@ -265,6 +265,7 @@ int event_accept(int fd) {
|
||||
s->data_source = DATA_SRC_NONE;
|
||||
|
||||
s->uniq_id = totalconn;
|
||||
totalconn++;
|
||||
proxy_inc_fe_ctr(l, p); /* note: cum_beconn will be increased once assigned */
|
||||
|
||||
txn = &s->txn;
|
||||
@ -486,7 +487,6 @@ int event_accept(int fd) {
|
||||
}
|
||||
|
||||
actconn++;
|
||||
totalconn++;
|
||||
|
||||
// fprintf(stderr, "accepting from %p => %d conn, %d total, task=%p\n", p, actconn, totalconn, t);
|
||||
} /* end of while (p->feconn < p->maxconn) */
|
||||
|
||||
@ -487,6 +487,7 @@ int uxst_event_accept(int fd) {
|
||||
s->data_state = DATA_ST_INIT;
|
||||
s->data_source = DATA_SRC_NONE;
|
||||
s->uniq_id = totalconn;
|
||||
totalconn++;
|
||||
|
||||
if ((s->req = pool_alloc2(pool2_buffer)) == NULL)
|
||||
goto out_free_task;
|
||||
@ -554,7 +555,6 @@ int uxst_event_accept(int fd) {
|
||||
l->state = LI_FULL;
|
||||
}
|
||||
actconn++;
|
||||
totalconn++;
|
||||
}
|
||||
return 0;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user