/* OK let's complete stream initialization since there is no handshake */
cli_conn->flags |= CO_FL_CONNECTED;
+ /* we want the connection handler to notify the stream interface about updates. */
+ cli_conn->flags |= CO_FL_WAKE_DATA;
+
+ /* if logs require transport layer information, note it on the connection */
+ if (sess->fe->to_log & LW_XPRT)
+ cli_conn->flags |= CO_FL_XPRT_TRACKED;
+
session_count_new(sess);
strm = stream_new(sess, t);
if (!strm)
if (conn->flags & CO_FL_ERROR)
goto fail;
+ /* we want the connection handler to notify the stream interface about updates. */
+ conn->flags |= CO_FL_WAKE_DATA;
+
+ /* if logs require transport layer information, note it on the connection */
+ if (sess->fe->to_log & LW_XPRT)
+ conn->flags |= CO_FL_XPRT_TRACKED;
+
session_count_new(sess);
task->process = sess->listener->handler;
strm = stream_new(sess, task);
strm->target = sess->listener->default_target;
strm->req.analysers = sess->listener->analysers;
conn->flags &= ~CO_FL_INIT_DATA;
+
return 0;
fail:
if (sess->fe->accept && sess->fe->accept(s) < 0)
goto out_fail_accept;
- if (conn) {
- /* if logs require transport layer information, note it on the connection */
- if (s->logs.logwait & LW_XPRT)
- conn->flags |= CO_FL_XPRT_TRACKED;
-
- /* we want the connection handler to notify the stream interface about updates. */
- conn->flags |= CO_FL_WAKE_DATA;
- }
-
/* 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.