Skip to content

fix: 修复 HTTP/3 慢响应的 QUIC 空闲超时 - #75

Merged
Mag1cFall merged 2 commits into
Mag1cFall:mainfrom
anon0v0:fix/quic-keepalive
Oct 25, 2026
Merged

Mag1cFall merged 2 commits into
Mag1cFall:mainfrom
anon0v0:fix/quic-keepalive

Conversation

@anon0v0

@anon0v0 anon0v0 commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

改动 / Changes

为 QUIC 连接启用 10 秒 PING 保活,避免等待生成响应时触发空闲超时。补充慢响应头、响应体停顿和请求取消测试。

验证 / Verification

  • 去掉保活时,两项慢响应测试均复现 timeout: no recent network activity;修复后连续 20 轮通过。
  • Linux 原时长验证:30 秒空闲期限下,35 秒响应头延迟、响应体停顿和请求取消均通过。
  • go test -mod=readonly ./internal/aistudio -run 'TestHTTP3(SlowResponse|KeepAliveCancellation)$' -count=20
  • CGO_ENABLED=0 go test -mod=readonly ./cmd/... ./internal/...
  • CGO_ENABLED=0 go vet -mod=readonly ./...
  • CGO_ENABLED=0 GOOS=windows go vet -mod=readonly -tags desktop,production ./...
  • Linux amd64 构建,以及前端 lint、format:check、build 通过。

anon0v0 and others added 2 commits October 25, 2026 23:39
- 保活 PING 改为只在请求流未完成时按空闲超时的一半发送,空闲连接与 Firefox 一样到时关闭
- 升级 uquic 分叉以支持按流保活,移出与保活无关的取消测试,补充 HTTP/3 保活文档
@Mag1cFall
Mag1cFall merged commit 160b52e into Mag1cFall:main Oct 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants