alibaba / xquic

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

idle_time_out 初始化问题 #240

Closed ligoudanblabla closed 1 year ago

ligoudanblabla commented 1 year ago

xqc_conn_init_trans_settings 函数中 设置 ls->max_idle_timeout = default_conn_settings.idle_time_out;

是不是应该设置为conn->conn_settings.idle_time_out

ellzu commented 1 year ago

xqc_conn_get_idle_timeout(xqc_connection_t conn) { if (conn->conn_type == XQC_CONN_TYPE_SERVER && !(conn->conn_flag & XQC_CONN_FLAG_HANDSHAKE_COMPLETED)) { / only server will limit idle timeout to init_idle_time_out before handshake completed */ return conn->conn_settings.init_idle_time_out == 0 ? XQC_CONN_INITIAL_IDLE_TIMEOUT : conn->conn_settings.init_idle_time_out;

} else {
    return conn->local_settings.max_idle_timeout == 0
        ? XQC_CONN_DEFAULT_IDLE_TIMEOUT : conn->local_settings.max_idle_timeout;
}

} 这是里面一段源码,看起来是特意这么设计的(这里说是before)但函数名跟调用时机好像都是after(不排除我看错了)