alibaba / xquic

XQUIC Library released by Alibaba is a cross-platform implementation of QUIC and HTTP/3 protocol.
Apache License 2.0
1.7k stars 327 forks source link

[Bug]: xqc_stream.c这里先添加pos到retry链表,紧接着马上删除pos,是否逻辑有问题? #174

Closed adcen0107 closed 2 years ago

adcen0107 commented 2 years ago

What happened?

  int 

xqc_crypto_stream_send(xqc_stream_t stream, xqc_list_head_t crypto_data_list, xqc_pkt_type_t pkt_type) { //process something

    /* client buffer initial level crypto data */
    if (c->conn_type == XQC_CONN_TYPE_CLIENT
        && stream->stream_encrypt_level == XQC_ENC_LEV_INIT)
    {
        xqc_list_add_tail(pos, &c->retry_crypto_data_buffer);
    }

    xqc_list_del(pos);
    xqc_free(buf);
}

Steps To Reproduce

是否是如下逻辑? / client buffer initial level crypto data / if (c->conn_type == XQC_CONN_TYPE_CLIENT && stream->stream_encrypt_level == XQC_ENC_LEV_INIT) { xqc_list_add_tail(pos, &c->retry_crypto_data_buffer); } else { xqc_list_del(pos); xqc_free(buf); }

Relevant log output

No response

ruiqizhou commented 2 years ago

The new release this month will add support for handling the Retry packet and fix the problem.