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.
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;
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;
}