mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Fix: IETF mini conn not tickable if can't send due to amplification
This commit is contained in:
parent
10f94146d0
commit
780fa2c574
1 changed files with 8 additions and 1 deletions
|
@ -46,6 +46,9 @@ static const struct conn_iface mini_conn_ietf_iface;
|
||||||
|
|
||||||
static unsigned highest_bit_set (unsigned long long);
|
static unsigned highest_bit_set (unsigned long long);
|
||||||
|
|
||||||
|
static int
|
||||||
|
imico_can_send (const struct ietf_mini_conn *, size_t);
|
||||||
|
|
||||||
|
|
||||||
static const enum header_type el2hety[] =
|
static const enum header_type el2hety[] =
|
||||||
{
|
{
|
||||||
|
@ -625,11 +628,15 @@ ietf_mini_conn_ci_is_tickable (struct lsquic_conn *lconn)
|
||||||
{
|
{
|
||||||
struct ietf_mini_conn *const conn = (struct ietf_mini_conn *) lconn;
|
struct ietf_mini_conn *const conn = (struct ietf_mini_conn *) lconn;
|
||||||
const struct lsquic_packet_out *packet_out;
|
const struct lsquic_packet_out *packet_out;
|
||||||
|
size_t packet_size;
|
||||||
|
|
||||||
if (conn->imc_enpub->enp_flags & ENPUB_CAN_SEND)
|
if (conn->imc_enpub->enp_flags & ENPUB_CAN_SEND)
|
||||||
TAILQ_FOREACH(packet_out, &conn->imc_packets_out, po_next)
|
TAILQ_FOREACH(packet_out, &conn->imc_packets_out, po_next)
|
||||||
if (!(packet_out->po_flags & PO_SENT))
|
if (!(packet_out->po_flags & PO_SENT))
|
||||||
return 1;
|
{
|
||||||
|
packet_size = lsquic_packet_out_total_sz(lconn, packet_out);
|
||||||
|
return imico_can_send(conn, packet_size + IQUIC_TAG_LEN);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue