TRACE_DEVEL("leaving after releasing the connection", H2_EV_H2C_WAKE);
return -1;
}
+
+ /* connections in error must be removed from the idle lists */
+ HA_SPIN_LOCK(OTHER_LOCK, &toremove_lock[tid]);
+ MT_LIST_DEL((struct mt_list *)&conn->list);
+ HA_SPIN_UNLOCK(OTHER_LOCK, &toremove_lock[tid]);
+ }
+ else if (h2c->st0 == H2_CS_ERROR) {
+ /* connections in error must be removed from the idle lists */
+ HA_SPIN_LOCK(OTHER_LOCK, &toremove_lock[tid]);
+ MT_LIST_DEL((struct mt_list *)&conn->list);
+ HA_SPIN_UNLOCK(OTHER_LOCK, &toremove_lock[tid]);
}
if (!b_data(&h2c->dbuf))
offer_buffers(NULL, tasks_run_queue);
}
+ /* in any case this connection must not be considered idle anymore */
+ HA_SPIN_LOCK(OTHER_LOCK, &toremove_lock[tid]);
+ MT_LIST_DEL((struct mt_list *)&h2c->conn->list);
+ HA_SPIN_UNLOCK(OTHER_LOCK, &toremove_lock[tid]);
+
/* either we can release everything now or it will be done later once
* the last stream closes.
*/