} /* !stopping */
else {
/* soft stop case */
- if (task->state & TASK_WOKEN_SIGNAL) {
+ if (state & TASK_WOKEN_SIGNAL) {
/* We've just recieved the signal */
if (!(peers->flags & PEERS_F_DONOTSTOP)) {
/* add DO NOT STOP flag if not present */
* disabled and finally kills the file descriptor. This function requires that
* sess->origin points to the incoming connection.
*/
-static void session_kill_embryonic(struct session *sess)
+static void session_kill_embryonic(struct session *sess, unsigned short state)
{
int level = LOG_INFO;
struct connection *conn = __objt_conn(sess->origin);
}
if (log) {
- if (!conn->err_code && (task->state & TASK_WOKEN_TIMER)) {
+ if (!conn->err_code && (state & TASK_WOKEN_TIMER)) {
if (conn->flags & CO_FL_ACCEPT_PROXY)
conn->err_code = CO_ER_PRX_TIMEOUT;
else if (conn->flags & CO_FL_ACCEPT_CIP)
if (!(state & TASK_WOKEN_TIMER))
return t;
- session_kill_embryonic(sess);
+ session_kill_embryonic(sess, state);
return NULL;
}
fail:
if (sess->task)
- session_kill_embryonic(sess);
+ session_kill_embryonic(sess, 0);
return -1;
}