struct mt_list wait_queue; /* link element to make the listener wait for something (LI_LIMITED) */
char *name; /* listener's name */
- unsigned int thr_conn[MAX_THREADS]; /* number of connections per thread */
+ unsigned int thr_conn[MAX_THREADS_PER_GROUP]; /* number of connections per thread for the group */
struct list by_fe; /* chaining in frontend's list of listeners */
struct list by_bind; /* chaining in bind_conf's list of listeners */
break;
li = __objt_listener(conn->target);
- _HA_ATOMIC_INC(&li->thr_conn[tid]);
+ _HA_ATOMIC_INC(&li->thr_conn[ti->ltid]);
ret = li->bind_conf->accept(conn);
if (ret <= 0) {
/* connection was terminated by the application */
* than t2.
*/
- q1 += l->thr_conn[base + t1];
- q2 += l->thr_conn[base + t2];
+ q1 += l->thr_conn[t1];
+ q2 += l->thr_conn[t2];
if (q1 - q2 < 0) {
t = t1;
#endif // USE_THREAD
local_accept:
- _HA_ATOMIC_INC(&l->thr_conn[tid]);
+ _HA_ATOMIC_INC(&l->thr_conn[ti->ltid]);
ret = l->bind_conf->accept(cli_conn);
if (unlikely(ret <= 0)) {
/* The connection was closed by stream_accept(). Either
if (fe)
_HA_ATOMIC_DEC(&fe->feconn);
_HA_ATOMIC_DEC(&l->nbconn);
- _HA_ATOMIC_DEC(&l->thr_conn[tid]);
+ _HA_ATOMIC_DEC(&l->thr_conn[ti->ltid]);
if (l->state == LI_FULL || l->state == LI_LIMITED)
relax_listener(l, 0, 0);