diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 9288de99f..e59922cf8 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -1960,6 +1960,8 @@ spoe_create_appctx(struct spoe_config *conf) task_wakeup(SPOE_APPCTX(appctx)->task, TASK_WOKEN_INIT); LIST_ADDQ(&conf->agent->applets, &SPOE_APPCTX(appctx)->list); conf->agent->applets_act++; + + task_wakeup(task, TASK_WOKEN_INIT); return appctx; /* Error unrolling */ diff --git a/src/hlua.c b/src/hlua.c index b8d2c88de..85e0c664e 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -2353,6 +2353,7 @@ __LJMP static int hlua_socket_new(lua_State *L) jobs++; totalconn++; + task_wakeup(task, TASK_WOKEN_INIT); /* Return yield waiting for connection. */ return 1; diff --git a/src/peers.c b/src/peers.c index 7f63aa9fc..643b8c52a 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1835,6 +1835,7 @@ static struct appctx *peer_session_create(struct peers *peers, struct peer *peer totalconn++; peer->appctx = appctx; + task_wakeup(t, TASK_WOKEN_INIT); return appctx; /* Error unrolling */ diff --git a/src/session.c b/src/session.c index 34250eb53..46b9f67e3 100644 --- a/src/session.c +++ b/src/session.c @@ -276,6 +276,7 @@ int session_accept_fd(struct listener *l, int cfd, struct sockaddr_storage *addr strm->target = sess->listener->default_target; strm->req.analysers |= sess->listener->analysers; + task_wakeup(t, TASK_WOKEN_INIT); return 1; out_free_task: @@ -446,6 +447,7 @@ static int conn_complete_session(struct connection *conn) strm->req.analysers |= sess->listener->analysers; conn->flags &= ~CO_FL_INIT_DATA; + task_wakeup(task, TASK_WOKEN_INIT); return 0; fail: diff --git a/src/stream.c b/src/stream.c index bc8b3af13..78748373f 100644 --- a/src/stream.c +++ b/src/stream.c @@ -239,9 +239,10 @@ struct stream *stream_new(struct session *sess, struct task *t, enum obj_type *o /* it is important not to call the wakeup function directly but to * pass through task_wakeup(), because this one knows how to apply - * priorities to tasks. + * priorities to tasks. Using multi thread we must be sure that + * stream is fully initialized before calling task_wakeup. So + * the caller must handle the task_wakeup */ - task_wakeup(t, TASK_WOKEN_INIT); return s; /* Error unrolling */