If we're adding a connection to the server orphan idle list, don't forget
to remove the CO_FL_SESS_IDLE flag, or we will assume later it's still
attached to a session.
This should be backported to 1.9.
/* The server doesn't want it, let's kill the connection right away */
conn->mux->destroy(conn);
return -1;
- }
+ } else
+ conn->flags &= ~CO_FL_SESS_IDLE;
return 1;
} else {
conn->flags |= CO_FL_SESS_IDLE;
LIST_DEL(&conn->session_list);
LIST_INIT(&conn->session_list);
conn->owner = NULL;
+ conn->flags &= ~CO_FL_SESS_IDLE;
if (!srv_add_to_idle_list(objt_server(conn->target), conn))
conn->mux->destroy(conn);
} else {