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

[Feature]: 服务端idle_time_out后,没有向客户端发起断开连接指令 #261

Closed ellzu closed 1 year ago

ellzu commented 1 year ago

Before request a new feature

Describe the feature you'd like supported

服务端idle_time_out后,没有向客户端发起断开连接指令,这样客户端一直认为连接还继续可用

Describe alternatives you've considered

No response

Additional context

No response

ruiqizhou commented 1 year ago

可以看下 RFC9000中 对 idle timeout 的说明 https://datatracker.ietf.org/doc/html/rfc9000#section-10.1

If a max_idle_timeout is specified by either endpoint in its transport parameters (Section 18.2), the connection is silently closed and its state is discarded when it remains idle for longer than the minimum of the max_idle_timeout value advertised by both endpoints.

ellzu commented 1 year ago

是的,你发的内容没错。 不过我联调 xquic客户端 与 xquic服务端 的时候发现 并没有遵守这文档的约定。

我设置了服务端的 idle_time_out 10秒,客户端的 idle_time_out 10秒 表现就是 建立连接,10秒后 服务端日志显示destory connect,但是客户端没有任何日志输出, 再次使用连接发送信息,也能发送成功。但是服务端收到UDP 数据之后,给 xqc_engine_packet_process 会输出 connection not found日志。

我看源码 客户端的 idle_time_out 是不生效的。你们改用了 max_idle_time_out(120秒)。 按照协议,此时应该使用服务端对齐的 idle_time_out(10秒)。但是好像也没生效