mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-25 01:10:59 -04:00
fix: too much connection with -m option
Some checks are pending
Contrib / admin/halog/ (push) Waiting to run
Contrib / dev/flags/ (push) Waiting to run
Contrib / dev/haring/ (push) Waiting to run
Contrib / dev/hpack/ (push) Waiting to run
Contrib / dev/poll/ (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run
Some checks are pending
Contrib / admin/halog/ (push) Waiting to run
Contrib / dev/flags/ (push) Waiting to run
Contrib / dev/haring/ (push) Waiting to run
Contrib / dev/hpack/ (push) Waiting to run
Contrib / dev/poll/ (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run
this is due to recent modifs, where the stream expiration info has been moved to the hldstream struct (we do no more rely on the underlying task expiration). But this expiration was not initialized and taken as expiration value for the user task, leading this user task to be wake up as soon as the first stream is intantiated. This is not correct. The user task must wait for the connection establishment.
This commit is contained in:
parent
1e2ab47d5a
commit
26ce14ea82
1 changed files with 3 additions and 1 deletions
|
|
@ -1327,9 +1327,10 @@ static struct hldstream *hld_new_strm(struct hld_usr *usr,
|
|||
|
||||
t->context = hs;
|
||||
t->process = hld_strm_task;
|
||||
t->expire = TICK_ETERNITY;//tick_add(now_ms, MS_TO_TICKS(arg_wait));
|
||||
t->expire = TICK_ETERNITY;
|
||||
|
||||
hs->conn = conn;
|
||||
hs->expire = tick_add(now_ms, MS_TO_TICKS(arg_wait));
|
||||
hs->hash = hash;
|
||||
hs->usr = usr;
|
||||
hs->url = url;
|
||||
|
|
@ -1470,6 +1471,7 @@ static struct task *hld_usr_task(struct task *t, void *context, unsigned int sta
|
|||
if (!LIST_ISEMPTY(&usr->strms)) {
|
||||
struct hldstream *first_hs =
|
||||
LIST_ELEM(usr->strms.n, struct hldstream *, list);
|
||||
BUG_ON(tick_is_expired(first_hs->expire, now_ms));
|
||||
usr->task->expire = first_hs->expire;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue